Eternity Async Tutoring

I only have a vague knowledge of prefix and postfix notation. Nothing useable really. Though I think I can evaluate that expression. and(1, 1, 1, 1, 0, 1) = 0

and = For “and” to be true all inputs have to be true, otherwise its false.
or = For “or” to be true just one input has to be true, otherwise its false.
xor = For “xor” to be true only one input can be true, otherwise its false.

Yeah though I think “at least one” is clearer than “just one”.

That is a good guess and a useful concept. However, FYI, xor often means “an odd number of inputs are true”.

Prefix means the operator comes first, infix means in the middle and postix means at the end.

and(1,1) is prefix. 1&1 is infix. (1,1)and is postfix.

Assignment:

Define or(x,y,z) using only operators that take 2 or fewer inputs.

like this: or(x,y,z) = or(or(x,y),or(y,z))? Here’s the truth tables if so.

That’s correct but can you find a simpler or shorter answer?

or(or(x,y),or(y,z)) = or(or(x,y), z)


Simpler than that?

you got it.

ok do and(x,y,z) using operators with 2 or fewer inputs

and explain nand and nor, in English, for many inputs.

and(x,y,z) = and(and(x,y), z)

nand = For “nand” to be true at least one input has to be false, otherwise its false.
nor = For “nor” to be true all inputs have to be false, otherwise its false.

yes.

and = all
nand = not all
or = at least one
nor = none

try making 3 input nand, nor and xor using operators that take 2 or fewer inputs. for each one, you can stop and give up after 15-30min if it’s hard.

For nand/nor is nand(x,y,z) = not(and(and(x,y), z)) and not(or(or(x,y), z)) sufficient or do you want me to come up with a different way?

that’s good

Hmmm. Spent around 20 minutes. xor seems hard with the information that an odd number of inputs are true.


I tried working backward from it being true when only one input is true, or when all three inputs are true. No success.

Can you think of a way to check if exactly two inputs are true?

Use an and gate? If two inputs are true it will send out true, otherwise its false.

The context is there are 3 inputs.

You can go through each number (0, 1, 2, 3) and try to think of a way to figure out if exactly that many inputs, out of 3, are true. Give up if you’re stuck too long for each number though.

Assignment: read the recent LMD tutoring thread discussion about IF/THEN and IMPLIES and make sure that stuff makes sense to you. It starts at LMD Async Tutoring - #279 by LMD

Off topic assignment but let’s try a close reading and analysis to see how you do:

https://www.reddit.com/r/AITAH/comments/1djuriw/aitah_for_breaking_up_with_my_girlfriend_when_she/

Read the original post only. Do not read any comments for now.

Write analysis and your conclusion.

15-60min

  • I guess I’m trying to figure out if he’s the asshole or not?
  • “When I was 16 years old my girlfriend broke up with me. I was pathetic and begged her to change her mind. I thought I was in love and couldn’t be without her. I was an idiot.”
    • Ok.
  • “I’m 25 now and I have promised myself I will never do that again. I have had several relationships and a few hook ups. And when they end I am sad but not weak.”
    • So he will never be pathetic, begging, or weak again.
  • “I had been with my girlfriend for a year and a half. We met at a social function for people in our line of work. We hit it off and started seeing each other more often then made it exclusive.”
    • Recent girlfriend.
  • “Recently we have been talking about moving in together. Our city is expensive and we thought we could save some money. Her apartment is bigger than mine but I own mine so we were working stuff out.”
    • Alrighty.
  • “Last weekend out of nowhere she says that we are moving too fast. Okay no problem we didn’t make any plans that can’t be undone yet.”
    • Fair enough I guess.
  • "Nope she said that she wanted to break up because she wasn’t sure I was all in. I said okay. Then she freaked out. Apparently it was a test to see if I would fight for her. "
    • That’s weird. Why is there some issue about him being “all in”. I guess she thought moving in was this big thing with a lot of social implication. He saw it as a way to effectively cut costs and presumably be with someone he likes but nothing to deep about it.
    • A test to fight for her? So she wanted him to in that moment try to reconcile the situation and keep the relationship going. He didn’t and just ended the relationship.
  • “Yeah I don’t do that any more and I do not appreciate mind games. So I told her that I would box up anything of hers that might be at my place and she could pick it up.”
    • Do what anymore? I think there’s issues with what the girl did, sure. However, as far as the information the poster gave: what he said he wouldn’t do anymore was be pathetic, weak, or begging. I guess he equates trying to reconcile that situation with being one of those. She wants to break up. He agrees. If he didn’t agree to it, I guess one could say he may end up begging to get her back. Sure.
  • “She accused me of being a cold-hearted asshole that was only using her for sex. I wasn’t. I thought we had a future. I wasn’t ready to propose or anything but I thought she was the one. We had met each other’s families and she had spent last Christmas with us. My parents and sister love her. I loved her.”
    • I wonder if that’s where the test came from? I guess in her head she was like “i feel like he’s only using me for sex, let’s do this test to check. if he actually cares for me more than sex than he’ll fight for me”
  • “My mom and dad called me to ask what was going in and I told them. They think I am being stubborn. My little sister says I’m being a complete jerk for not forgiving my ex.”
    • Ok.
  • “I just remember crying myself to sleep over a girl and refuse to do it again.”
    • I don’t know. This feels like OP is equating trying to keep a girl that you like in your life as the same as breaking down begging and crying. I wonder how he would act in a non-test scenario? A girl he apparently loves more effectively communicates some issues she’s having and thinks they should break-up. Would he try and communicate through those issues and talk it out or would he just break up?
  • “AITAH?”
    • I don’t think he’s an asshole. Some parts of the situation could be handled better I think? If he really felt like this girl was “… the one” maybe he should’ve tried talking to her and communicate through the bad thing she did. She did say she wanted to break-up and he took it at face value. So yeah I guess.

~25 minutes, I copied and pasted this from my note app.

Yeah I think it makes sense to me.

For conditional/(IF/THEN) statements: If x, then y. If x happens, then y should happen. If y does not happen the statement is false. If y does happen the statement is true. If x does not happen, then doing y doesn’t matter. Whether you do y or not y its irrelevant because the condition, x, was not met.

Similar to IMPLES: What matters is the implication is true. x imples y. If you have x and y thats true. If you have x but not y that makes the statement false. if you don’t have x but you have y or ~y then you take the statement at face value and say itst true.

1 Like

Ok so I re-worded this kind of in my head to make more sense of this: I’m looking to create logical expressions for which I can use to tell whether I have 0,1,2, or 3 inputs out of 3 be true.

0 and 3 were easy.
For 0 you can use an “or” or “nor” gate. If OR outputs false, all the inputs are false. If NOR outputs true all inputs are false. Regardless you can judge that all three inputs were false.
For 3 you can use an “and” or “nand” gate. If and outputs true, that means all the inputs were true. If nand outputs false that means no input was false, they were all true. Regardless you can judge that all three inputs were true.

For 1 and 2 I came up with these expressions:
One Input:
(x∧~y∧~z)∨(~x∧y∧~z)∨(~x∧~y∧z)

Two Input:
(x∧y∧~z)∨(~x∧y∧z)∨(x∧~y∧z)

When it came out to trying different ideas for the three input ones I got tired of making truth tables and looked up for a program that makes the tables for me. It doesn’t solve anything. It just creates the tables based on my input. If this is an issue I’ll stop using it. This is the website: https://truth-table.com/

Can you explain them in English?

If you just enter a bunch of stuff into the website by trial and error, and let it do all the calculation, I don’t think that’ll be very helpful for you. If you use it to double check things after you think you figured them out, that’s OK. It’s also OK to use it to save typing.