Look for a simpler solution to output T or F.
Always false:
(x & !x) | (y & !y)
This is saying that for any set of inputs, the inputs for x and y have to be both be âx and yâ and ânot x and not yâ. That doesnât work.
Always true:
(x | y) | (!x | !y)
This is saying that it could be âx or yâ or " not x or not y" . Any x or y works.
Is this fine? I just thought of the simplest ways to get always true and always false.
Closer but there is simpler. Let me know if you need a hint.
Mmm. If your saying their is a simpler way to write always false and always true for two inputs then I need a hint.
I donât know if maybe the simpler part is just focusing on just one variable. So x & !x = always false, or x or !x = always true.
Do you think thereâs something about this that doesnât work? Or do you think it isnât simpler?
You can try evaluating x & !x for all values of x and y to see if it works.
I do think thereâs something about this that doesnât work. I donât think it would work for two inputs. I do think itâs simpler. In the sense that itâs simpler to deal with one variable (x) instead of two (x and y).
Ok.
(x & !x)
x y
TT = T & F = F
TF = T & F = F
FT = F & T = F
FF = F & T = F
Hmm. I guess that works. I just evaluated the truth table using x and ignored y but it still worked? I think I did this right?
Itâs also simpler by being shorter and having fewer elements (fewer variables, fewer operators).
Using all inputs is not required. Have you done graphing algebra equations at all? On an x,y plane, you can do the equation x=3 and get a straight vertical line. You donât have to write x=3+0y and donât have to make the y more useful somewhere in the equation.
yes
Huh. I like that comparison a lot. Yeah I have. That makes sense.
Construct some logic trees (arithmetic is fine too). Just make them up arbitrarily, not based on an expression. Then convert some from tree form to prefix expressions and some to infix expressions.
Trees.pdf (26.8 KB)
You did trees first, expressions second, right?
Assignment: Play the video game Baba Is You (currently on sale on Steam).
Itâs a puzzle game with unlimited undo so you donât have to start over if you mess up. Itâs safe to do trial and error. It uses logical thinking and words.
Determine if you like it and/or think youâre learning something. If so, replace some of your other video game time with playing it.
If youâre interested, thereâs also another puzzle game I particularly like, which is Toki Tori (1 not 2), so feel free to try it, but itâs more like a regular game and the puzzles arenât based on words and logic as much.
Yessir.
I tried looking for puzzle games that uses logical thinking previously with no success, so thatâs cool. Tbh my strategy was to just do puzzle and logic and nothing that really looked like a logic game came up. I didnât want to get a game and figure out if itâs a logic game.
Ok. Both games are available on switch so I went ahead and got them both to try out.
I work soon and late today, so I will share how they go tomorrow.
Does âdoâ = âuse the search termsâ?
Good.
Extra parentheses arenât needed with prefix like they sometimes are with infix. If youâre unclear on this, show me a simple example where you think theyâre needed.
I donât normally use minus or divide with more than 2 inputs. Iâd generally rather use addition with negatives or multiplication with fractions. One reason is that âsubtract all the later numbers from the first numberâ is not a super common thing to do and itâs a less intuitively obvious meaning than the multi-input meanings that addition or multiplication have.
Do you play or know much about poker?
Yea. After I wrote it I realized it wasnât too clear what I meant by do here.
Nope. I know pretty much nothing about poker.
or(or(or(x,y), z), z). Hmm. That makes sense I think. Iâm not too sure though. For some reason after you told me they arenât needed I canât think of examples where I would need them. I put in extra parentheses as I go along, so maybe thatâs why its hard? I canât think of a simple expression where I would need them.