# LMD Async Tutoring

**URL:** <https://discuss.criticalfallibilism.com/t/lmd-async-tutoring/1933>\
**Category:** Tutoring\
**Created:** [April 23, 2024, 12:05am UTC](https://discuss.criticalfallibilism.com/t/lmd-async-tutoring/1933 "2024-04-23T00:05:39Z")\
**Posts on this page:** 1\
**Showing post:** 347

<div class="post-metadata">

**Author:** ![LMD](https://discuss.criticalfallibilism.com/user_avatar/discuss.criticalfallibilism.com/lmd/32/3213_2.png) [@LMD](https://discuss.criticalfallibilism.com/u/LMD)\
**Post date:** [July 7, 2024, 4:00am UTC](https://discuss.criticalfallibilism.com/t/lmd-async-tutoring/1933/347 "2024-07-07T04:00:39Z")

</div>

Next in Eternity’s Thread:

> [@Eternity Async Tutoring](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932/253):
>
> Can you think of a way to check if exactly two inputs are true?

> [@Eternity Async Tutoring](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932/255):
>
> 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.

I hadn’t got the 2 inputs true one after ~19mins so have moved to trying 0, 1, 2, 3. Maybe I’ll learn something that helps with 2 inputs:

 ![Screenshot 2024-07-07 at 1.55.10 PM](https://discuss.criticalfallibilism.com/uploads/default/original/2X/d/ddd40a8dc1534b5c3e4606a622f7ea7815612c82.png)

Alright, so I have solution for them all!

I initially tried a way to check for 2 true inputs. I was only able to get 7/8 outputs right. I then tried a way for checking for only one true input (English XOR), and I was also only able to get 7/8 outputs right(by using [XOR](https://discuss.criticalfallibilism.com/t/lmd-async-tutoring/1933/340)).

I then moved on to checking zero true inputs and got that easy: **nor(x, y, z)**

 ![Screenshot 2024-07-07 at 1.57.21 PM](https://discuss.criticalfallibilism.com/uploads/default/original/2X/7/72f21c8bde25799ff4bcedf16ebc40ad09b1ff6b.png)

I then moved on to checking three true inputs and got that easy too: **and(x, y, z)**

 ![Screenshot 2024-07-07 at 1.57.58 PM](https://discuss.criticalfallibilism.com/uploads/default/original/2X/d/df1df8705d971e83bbbe227b9ceeee7ea7627fea.png)

Then I realised that my results for checking 0 and 3 inputs, when xor’d with my attempts for 2 and 1 inputs respectively, allowed me to flip the remaining bit so my 2 and 1 input were correct for all input combinations!

so checking for only 2 true inputs: **xor(eq(z xor(x, y)), nor(x, y, z)**

 ![Screenshot 2024-07-07 at 1.58.45 PM](https://discuss.criticalfallibilism.com/uploads/default/original/2X/8/89d20f27f8e82370228fbeacc6811c92e9f65981.png)

and checking for only one true input (English XOR): **xor(and(x, y, z), xor(x, y, z))**

 ![Screenshot 2024-07-07 at 1.59.15 PM](https://discuss.criticalfallibilism.com/uploads/default/original/2X/1/1a518168cfd7b481e7263764143f70b33fcb7b0f.png)

---

_[View the full topic](https://discuss.criticalfallibilism.com/t/lmd-async-tutoring/1933)._
