LMD Async Tutoring

This is incorrect. 1+1 is 2.

So you’re trying to map 0->1 and 1->0 . So the order is reversed: a higher input gets a lower output. What kind of operation could help with that?

I think I am confused about the problem. Am I just using the numbers 1 and 0, and arithmetic operators? So no negative numbers, no numbers above one?

You can either use all integers or all reals (2 versions of the problem). Arithmetic works normally. Only 1 and 0 correspond to T and F, so the goal outputs are only 1 and 0, but all the other numbers can be used in calculations.

Okay yup I definitely didn’t understand what I was doing then.

I have my answer for not(x)

I thought division (as the denominator gets larger, the fraction gets smaller), but then I realised subtraction worked and then the solution occurred to me.

not(x) = 1 - x

when x = 1:

1 - 1 = 0

when x = 0:

1 - 0 = 1

yeah. keep reading the topic for more discussion about this, some number line discussion (relevant for you IMO), and a bunch of hints related to doing or with arithmetic (which we’re still doing today).

How is Baba Is You going?

I have an answer for or(x, y). After seeing the hints in Eternity’s thread last night I intended to try using ‘ceil’ and ‘floor’ this morning and try to make it work. I had another look again at Eternity’s thread this morning long enough to see they tried the same thing but I didn’t remember the details of their answer, but I knew that an answer with ‘ceil’ and ‘floor’ was possible.

anyway here is my answer with my working:

ceil(2.4) = 3
floor(2.4)= 2

test1(x, y): x + y/2

test1(1, 1): 1 + 1/2 = 1.5
test1(1, 0) 1 + 0/2 = 1
test1(0, 1) 0 + 1/2 = 0.5
test1(0, 0) 0 + 0/2 = 0

test2(x, y): x + floor(y/2)

test2(1, 1): 1 + floor(1/2) = 0
test2(0, 1): 0 + floor(1/2) = 0

test3(x,y): ceil(x/2 + y/2)

test3(1, 1): ceil(0.5 + 0.5) = 1
test3(1, 0): ceil(0 + 0.5) = 1
test3(0, 1): ceil(0.5 + 0) = 1
test3(0, 0) ceil(0 + 0) = 0

Answer:
or(x, y) = ceil(x/2 + y/2)

1 Like

Here is nand, nor, and xor. I got xor on my first attempt (and the others, but they were easier after knowing negation). My solution to xor reminds me of this equivalent logical expression I made earlier:

nand(x, y): 1 - (x * y)

nand(1, 1): 1 - (1) = 0
nand(1, 0): 1 - (0) = 1
nand(0, 1): 1 - (0) = 1
nand(0, 0): 1 - (0) = 1

nor:(x, y): 1 - ceil(x/2 + y/2)

nor(1, 1): 1 - ceil(0.5 + 0.5) = 0
nor(1, 0): 1 - ceil(0.5 + 0) = 0
nor(0, 1): 1 - ceil(0 + 0.5) = 0
nor(0, 0): 1 - ceil(0 + 0) = 1

xor(x, y) = ceil(x/2 + y/2) - xy

xor(1, 1) = ceil(0.5 + 0.5) - 1 = 0
xor(1, 0) = ceil(0.5 + 0) - 0 = 1
xor(0, 1) = ceil(0 + 0.5) - 0 = 1
xor(0, 0) = ceil(0 + 0) - 0 = 0

For the ones where you used real numbers, try them again with integer math.

Okay, and so that means no division because that’s multiplication by fractions which are reals?

Division is allowed, see Eternity Async Tutoring - #391 by Elliot

1 Like

Oh yes. That’s right.

Okay. I was thinking of ways that I might be able to use division with remainder or modulo, but then I realised that I could use an analog of de morgans laws to transform my integer ‘and’ (x * y) to an ‘or’.

or(x, y); 1 - ((1 - x) * (1 - y))

or(1, 1): 1 - (0 * 0) = 1
or(1, 0): 1 - (0 * 1) = 1
or(0, 1): 1 - (1 * 0) = 1
or(0, 0): 1 - (1 * 1) = 0

so

nor(x, y): (1 - x) * (1 - y)

nor(1, 1): (0 * 0) = 0
nor(1, 0): (0 * 1) = 0
nor(0, 1): (1 * 0) = 0
nor(0, 0): (1 * 1) = 1

and

xor(x, y): 1 - ((1 - x) * (1 - y)) - xy

xor(1, 1): 1 - ((1 - 1) * (1 - 1)) - (1 * 1) = 0
xor(1, 0): 1 - ((1 - 1) * (1 - 0)) - (1 * 0) = 1
xor(0, 1): 1 - ((1 - 0) * (1 - 1)) - (1 * 0) = 1
xor(0, 0): 1 - ((1 - 0) * (1 - 0)) - (0 * 0) = 0

I didn’t draw an arrow for 0, but it stays 0.

It’s like rotating the number line 180 degrees around the point 0.

I’m confused about this question. I can’t tell whether it’s asked in the context of multiplying by -1 or if it’s in a new context. I’m going to assume a new context, where it’s just asking what happens to the number line in addition.

So when you multiply an input by -1 it’s like you’re rotating the number line around 0 180 degrees.

So when you add 10 to an input, what does that do to the number line? Your input on the number line moves to the right by 10 units, or, you slide the number line to the left by 10 units.

It expands(multiplication) or contracts(division) the number line. This is cool because you can see how division is just multiplication by numbers less that 1.

Okay cool. I didn’t consider simplifying the equation further. I can see how now.

Screenshot 2024-07-20 at 11.13.54 AM

Cool so a simpler way of doing the xor I did above is:

xor(x, y): x + y - 2xy

Yeah, addition and subtraction move the number line left or right. That’s all I was looking for. You got it.

Yes. Try simplifying this with standard arithmetic.

There are also other solutions for or(x,y). Try to find another one with integers with no negative numbers, subtraction or non-linear terms. And you can find another one using a comparison operator. One of these: > >= < <= == != (last two are equality and inequality).

My play time is total 10.9 hours currently. I have 43 dandelions when looking at the main map. I did more playing closer the start of the assignment and I have done less playing recently. I haven’t been prioritising it, and when I do go to play it it’s usually after doing study or work and I’ve found myself a bit drained and unable to focus enough. It seems like I’m underestimating how much attention it needs. I don’t have any experience with having video games in my life so my intuitions are probably flawed for when is good to play. I think I should try to schedule it at times when I expect to have more mental energy.

I like the game. But I think theres evidence here that I am procrastinating playing it, and I’m not sure why that is. I think there is a part of me that is averse to spending much time playing video games in general, I think because part of me sees them as unproductive.

1 Like

I’ve written on 7 of the last 10 days. Intentional practise was not always what I counted. I counted some days on which I wrote for a decent amount of time on a few large multi paragraph personal communications. I decided at the time that I would count it towards my daily writing count and not after the fact.

I’m having regular problems of ‘getting started’ with writing practise, but I often enjoy it once I’m writing. I’m aware you’ve written about this issue in your article on procrastination and elsewhere. I’ve done some brainstorming about it, but I’m not good at effectively problem solving procrastination issues yet.

1 Like