Author Archives: spulapura

Algorithm Problems

1. Right away, we can see that Z must equal 1, since it is the carry which becomes the first digit of the four digit number. Carries in two number addition can only be equal to 1. Knowing that Z=1:

Either Y+1= W or Y+1=10. It can’t be the latter, since that would make W=0, and thus, Y would have to be 1. Since Z is already equal to 1, this can’t be true. Therefore, Y+1= W.

Either Y+W=11 or Y+W=1. The first equation must be true since the other equation would make Y and W equal to 0 and 1. Z is already equal to 0. So now we know that Y+W=11.

Substitute the first equation in for W in the second equation: Y+Y+1=11. Isolate and solve for Y. This makes Y=5. When this is substituted back into the first equation, we find that W=6.

Plug W, Y, and Z back into the first equation, and you find that X=9.

2. The first thing to notice about this problem is that when the first number is multiplied by the second digit of the second number, the product is the first number. Thus, the second digit of the second number, X, must be 1 (the multiplicative identity).

Next, form an equation from the problem using place, keeping place value in mind. Simplify and solve for Z.

(10+Y)(10Y)=100Y+10Z

100Y+10Y(Y)=100Y+10Z

10Y(Y)=10Z

Y(Y)=Z

Next, find all the possible combinations of Y and Z that would make this equation true within the problem. Y can’t be 0 or 1, since that would make Z=Y. Both 2 and 3 are possible values of Y, corresponding to values of 4 and 9 respectively for Z. Y can’t be greater than or equal to 4, because that would make Z a 2-digit number. Thus, Y=2 or 3 and Z=4 or 9.

Test out both combinations in the problem. If 2 and 4 are substituted, W=2, since Y is already 2, this combination doesn’t work. Thus, X=1, Y=3, Z=9, W=4, and V=0.

3. X=1, Y=0. This is immediately evident from the addition of the last digits in both numbers. Since X+X leaves Y and possibly a carry, X cannot equal 0 if X is distinct from Y. If X was 0, then X+X would be 0, since 0+0=0. However, that would make Y=0, and X and Y are not the same digit, so X must be 1.

4.

Step 1: James and Alyssa to the library (2min)

Step 2: James back to study hall (1min)

Step 3: Josh and Christine to the library (8min)

Step 4: Alyssa back to study hall (2min)

Step 5: James and Alyssa to the library (2min)

Total time: 15min.

Chances of four Pingry students cooperating long enough to figure out this algorithm and implement it within one period: Alarmingly low

5.

5 terms: 3 searches.

Search 1: Find 3, eliminate 3 terms, left with 2 terms. Search 2: Find 1, eliminate 1 term, left with 1 term. Search 3: Find term.

50 terms: 6 searches

Search 1: Eliminate 25 terms, left with 25. Search 2: Eliminate 13 terms, left with 12. Search 3: Eliminate 6 terms, left with 6. Search 4: Eliminate 3 terms, left with 3. Search 5: Eliminate 2 terms, left with 1. Search 6: Find term.

1,000 terms: 10 searches.

Search 1: Eliminate 500 terms, left with 500. Search 2: Eliminate 250 terms, left with 250. Search 3: Eliminate 125 terms, left with 125. Search 4: Eliminate 63 terms, left with 62. Search 5: Eliminate 31 terms, left with 31. Search 6: Eliminate 16 terms, left with 15. Search 7: Eliminate 8 terms, left with 7. Search 8: Eliminate 4 terms, left with 3. Search 9: Eliminate 2 terms, left with 1. Search 10: Find term.

100,000 terms: 17 searches.

Search 1: Eliminate 50,000 terms, left with 50,000. Search 2: Eliminate 25,000 terms, left with 25,000. Search 3: Eliminate 12,500 terms, left with 12,500. Search 4: Eliminate 6,250 terms, left with 6,250. Search 5: Eliminate 3,125 terms, left with 3,125. Search 6: Eliminate 1,563 terms, left with 1,562. Search 7: Eliminate 781 terms, left with 781. Search 8: Eliminate 391 terms, left with 390. Search 9: Eliminate 195 terms, left with 195. Search 10: Eliminate 98 terms, left with 97. Search 11: Eliminate 49 terms, left with 48. Search 12: Eliminate 24 terms, left with 24. Search 13: Eliminate 12 terms, left with 12. Search 14: Eliminate 6 terms, left with 6. Search 15: Eliminate 3 terms, left with 3. Search 16: Eliminate 2 terms, left with 1. Search 17: Find term.

Finding Josh: 1 search. Josh is the fifth of nine students in alphabetical order (Christine, Derek, Freddy, James, Josh, Rahul, Sharanya, Wenrui, Zach). Binary search looks at the middle term first, and since Josh is the middle term, which is the fifth term in this case, it would only take one search to find him.

6. To sort the first five and last five elements of a list, begin with the first number in the list. Search for the lowest number in the list to the right and switch it with the first number. The move on to the second, third, fourth, and fifth elements of the list and do the same. Then, move to the other end of the list and search for the highest number to the left. Switch that with the last element of the list. Then, do the same for the second-, third-, fourth-, and fifth-to-last numbers. The first five numbers should be the lowest of the list in order, and the last five numbers should be the highest of the list in order.

 

 

Confused? Don’t be. This is the Chrono-Synclastic Infundibulum. Everyone is always right.

Have a nice day.

Sharanya out.

Game Theory

They’ve been tossed around in slingshots by people young and old, day in and day out, on iPhone, iPad, iTouch, iWhateverElse…

… and people wonder why the Birds are Angry.  Now, they’re so angry, they’re striking back. The Angry Birds are designing their own, new and not-so-improved game using only a red ball, a stick, some bricks, a key, and Scratch. But before they can begin producing their replacement game, they’ve got to design it.

There are a great many game states in Angry Birds. There are 181 different positions for the aiming bar to be in (angle of 0-180 degrees). Each brick has 3 different states: When it hasn’t been hit by the ball and is gray in color, when it has been hit once and changes color to red, and when it has been hit twice and disappears. However, the blue bricks only have one state, since they can never disappear. The positions of the bricks change depending on the level, which creates even more game states. The key has two states: when it has not been hit (which constitutes a level in progress) and when it has been hit once (which completes the level). There is no state for a “loss” because it is impossible to lose this game. You just keep trying and trying until you complete the game or give up. There are infinite possible positions for the ball traveling in a parabolic path, depending on the power, the angle, and the force of gravity.

These game states are all linked into a game by means of the algorithm. The arrow keys manipulate the angle, and a slider changes the power. When the spacebar is pressed, the ball is launched. The higher the power, the faster it moves. The steeper the angle, the greater the change in Y for every change in X. The gravity variable begins at a constant, and once the spacebar is pressed, the variable decreases in value until the upward motion becomes downward motion, and the downward motion steadily becomes steeper as the gravity variable decreases. Each time the ball is launched, the “Tries” variable increases by 1. If the ball contacts the edge, the key, or one of the bricks, it moves back to the launcher. If it hits a brick, the brick changes to its next state (gray, red, disappear), and points are subtracted from the level score (the more “Tries” have been attempted, the more the score decreases). If the ball hits the key, the key says what number to press to continue, adds points to the level score, and adds the level score to the cumulative score. By pressing the button indicated by the key, the arrangement of bricks changes to the arrangement of the next level. However, if the ball touches the key on the last level, the key says that the game has ended. Pressing a1 resets the game to the arrangement of level 1.

All in all, it’s a great (erm, sort of great) alternative to Angry Birds for the animal lovers of the world.

 

 

Confused? Don’t be. This is the Chrono-Synclastic Infundibulum. Everyone is always right.

Have a nice day.

Sharanya out.

html- Code Only

<! doctype=html>

<! Sharanya Pulapura’s Blog Web Page>

<! Sorry about the organization. WordPress took away all my indents for some reason>

<html>

<body>
<h1>Latin Noun Declension</h1>
<h3><em> A simple guide to complex task of declining Latin nouns </em></h3>
There are five noun cases in Latin.
<ol>
<li>Nominative Case (NOM)— Indicates the subject of a sentence</li>
<li>Genitive Case (GEN)— Indicates the possessive</li>
<li>Dative Case (DAT)— Indicates the indirect object and, occasionally, the
direct object of a sentence.</li>
<li>Accusative Case (ACC)— Indicates the direct object and, occasionally, the
object of preposition in a sentence.</li>
<li>Ablative Case (ABL)— Indicates the object of most prepositions as well
as nouns that behave as adverbs (for example, the
ablative of means and the ablative absolute)</li>
<li>Vocative Case (VOC)— Indicates nouns of direct address.</li>
<li>Locative Case (LOC)— Indicates a location, used only with the names
of towns, cities, small islands, “the house”, “the
ground”, and “the country.”</li>
</ol>
There are three noun genders in Latin
<ul>
<li>Masculine (m.)</li>
<li>Feminine (f.)</li>
<li>Neuter (n.)</li>
</ul>
Latin nouns are declined based on their gender, number (singular or plural),
case, and declension (a category of nouns that change their endings in the
same way as each other).

A table of noun declension in the five major cases
<table width=”75%”>
<tbody>
<tr>
<td>Case/Number</td>
<td>Declension 1</td>
<td>Declension 2</td>
<td>Declension 3</td>
<td>Declension 4</td>
<td>Declension 5</td>
</tr>
<tr>
<td>NOM sing</td>
<td>-a</td>
<td>-us/-r (m.), -um (n.)</td>
<td>varies</td>
<td>-us (m.f.) -u(n.)</td>
<td>-es</td>
</tr>
<tr>
<td>GEN sing</td>
<td>-ae</td>
<td>-i</td>
<td>-is</td>
<td>-us</td>
<td>-ei</td>
</tr>
<tr>
<td>DAT sing</td>
<td>-ae</td>
<td>-o</td>
<td>-i</td>
<td>-ui (m.f.) -u(n.)</td>
<td>-ei</td>
</tr>
<tr>
<td>ACC sing</td>
<td>-am</td>
<td>-um</td>
<td>-em (m.f.), varies (n.)</td>
<td>-um (m.f.) -u(n.)</td>
<td>-em</td>
</tr>
<tr>
<td>ABL sing</td>
<td>-a</td>
<td>-o</td>
<td>-e</td>
<td>-u</td>
<td>-e</td>
</tr>
<tr>
<td>NOM pl</td>
<td>-ae</td>
<td>-i (m.), -a (n.)</td>
<td>-es (m.f), -a (n.)</td>
<td>-us (m.f.) -ua(n.)</td>
<td>-es</td>
</tr>
<tr>
<td>GEN pl</td>
<td>-arum</td>
<td>-orum</td>
<td>-um</td>
<td>-uum</td>
<td>-erum</td>
</tr>
<tr>
<td>DAT pl</td>
<td>-is</td>
<td>-is</td>
<td>-ibus</td>
<td>-ibus</td>
<td>-ebus</td>
</tr>
<tr>
<td>ACC pl</td>
<td>-as</td>
<td>-os (m.), -a (n.)</td>
<td>-es (m.f), -a (n.)</td>
<td>-us (m.f.) -ua(n.)</td>
<td>-es</td>
</tr>
<tr>
<td>ABL pl</td>
<td>-is</td>
<td>-is</td>
<td>-ibus</td>
<td>-ibus</td>
<td>-ebus</td>
</tr>
</tbody>
</table>
<img title=”Caecilius, the hero of Cambridge Latin Course” src=”http://www.aaps.k12.mi.us/tappan.pedley/files/06jucundusdesc.jpg&#8221; width=”25%”/>
<a href=”http://www.cambridgescp.com/Lpage.php?p=clc%5Etop%5Ehome”&gt; Click for Cambridge Latin Course Website </a>

 

</body>

</html>

html

Latin Noun Declension

Latin Noun Declension

A simple guide to complex task of declining Latin nouns

There are five noun cases in Latin.

  1. Nominative Case (NOM)— Indicates the subject of a sentence
  2. Genitive Case (GEN)— Indicates the possessive
  3. Dative Case (DAT)— Indicates the indirect object and, occasionally, the
    direct object of a sentence.
  4. Accusative Case (ACC)— Indicates the direct object and, occasionally, the
    object of preposition in a sentence.
  5. Ablative Case (ABL)— Indicates the object of most prepositions as well
    as nouns that behave as adverbs (for example, the
    ablative of means and the ablative absolute)
  6. Vocative Case (VOC)— Indicates nouns of direct address.
  7. Locative Case (LOC)— Indicates a location, used only with the names
    of towns, cities, small islands, “the house”, “the
    ground”, and “the country.”

There are three noun genders in Latin

  • Masculine (m.)
  • Feminine (f.)
  • Neuter (n.)

Latin nouns are declined based on their gender, number (singular or plural),
case, and declension (a category of nouns that change their endings in the
same way as each other).

A table of noun declension in the five major cases

Case/Number Declension 1 Declension 2 Declension 3 Declension 4 Declension 5
NOM sing -a -us/-r (m.), -um (n.) varies -us (m.f.) -u(n.) -es
GEN sing -ae -i -is -us -ei
DAT sing -ae -o -i -ui (m.f.) -u(n.) -ei
ACC sing -am -um -em (m.f.), varies (n.) -um (m.f.) -u(n.) -em
ABL sing -a -o -e -u -e
NOM pl -ae -i (m.), -a (n.) -es (m.f), -a (n.) -us (m.f.) -ua(n.) -es
GEN pl -arum -orum -um -uum -erum
DAT pl -is -is -ibus -ibus -ebus
ACC pl -as -os (m.), -a (n.) -es (m.f), -a (n.) -us (m.f.) -ua(n.) -es
ABL pl -is -is -ibus -ibus -ebus


Click for Cambridge Latin Course Website

Networks

1. An example of a star network is email. Ethernet is an example of a bus network.

You could use our card game as an example of a ring network: you could only pass to the person next to you. A star network is similar to a library. People take books from the library and return them to the library, but they don’t swap the books among each other. A bus network is similar to a road system. People can be transported from one building to another through the road system that connects the buildings.

2. Ethernet is a bus network. When you connect a device to the Ethernet cable, it can communicate with everything else connected to the Ethernet cable. This is a good system because it allows every computer connected to have direct access to every other computer, rather than indirect access through intermediaries that would result from a star or ring network. This makes Ethernet more efficient than star or ring networks. However, there is a chance that collision will occur in this system because two computers can communicate with a third at one time, resulting in a collision. However, this can be solved by randomizing the times when a computer can communicate so eventually, the computers will communicate at different times, which would fix the collision. Although this would slow the process down slightly, it is still more efficient than the ring or star networks.

3.A collision is when two devices in a network attempt to communicate with another at the same time, so that the information that each is trying to say is mixed up with what the other is trying to say. Traditionally, they are handled by randomizing the time that each communicates (similar to the “Pick a number from one to ten” function on Scratch), so there is less of a chance that they try to communicate at the same time.

4. When one device sends a message in a network, the repeater repeats the message to another device. A bridge is slightly more sophisticated, as it can decide whether or not information is relevant, and it only repeats the relevant information. A switch is a bridge that handles many networks. A router is used to translate the protocol, which defines how to interpret the 1’s and 0’s input (for example, http is a protocol).

5. To solve the networking problem with the cards, we first passed our cards so that everyone held onto exactly one of their original cards when they got it and passed their other card until everyone had one of their original cards. Then, everyone just kept passing their other card, except for the person who began with the joker, who modified the order until the cards were in numerical order. The joker waited until he received the king, kept the king, and passed the other card until he got the queen. On his next turn, he passed the king, and on the turn after that, he passed the queen, so that the king and the queen were in order. Next, he waited for the jack, and proceeded using the same method until all the cards were in order. This algorithm could be a little more efficient. Rather than starting with the king, then waiting for the queen and then the jack and so on, he could just wait until he had a card that was next sequentially to the card of the person he passed to, so that he would order the cards faster. Additionally, the algorithm would have been much more efficient if the entire class had not been yelling at everyone else.

 

 

Confused? Don’t be. This is the Chrono-Synclastic Infundibulum. Everyone is always right.

Have a nice day.

Sharanya out.

Dining Philosophers

TRANSCRIPT FROM CONVENTION OF FICTIONAL PHILOSOPHERS (discovered in the possession of HARRY POTTER by SEVERUS SNAPE)

DUMBLEDORE: My friends, I would like to congratulate you all. Together, we managed to solve the Dining Philosophers Problem without a single one of us starving. But now I ask you a small favor— let us reflect on our experience. Does anyone wish to pose a question to begin our discussion?

SPONGEBOB: Wow! We solved the problem? How?

(A number of sarcastic expressions are cast in SPONGEBOB’s direction)

YODA: Fool! No philosopher are you! Explain the algorithm, I will not. Leave, you must.

OBI-WAN: Was I any wiser when you trained me? No, the Force is strong with him, and he must learn. I will explain the algorithm. When we were not hungry, we were thinking. There was a one in ten chance that we would become hungry. When we became hungry, our hunger level increased until we ate or starved. In order to eat, both utensils next to us had to be unused. In order to ensure that nobody starved, we used a list which prioritized our requests for utensils. Immediately after one of us became hungry, our name was added to the list. When one of us was trying to eat, if we were higher on the list than either of the people sitting next to us, we were able to eat and then were deleted off of the list. If not, we waited until our neighbor(s) finished and were deleted from the list, and then we ate. While eating, there was a one in three chance we would finish eating immediately, and a two in three chance that we would have to eat for longer until we were finished.

SPONGEBOB: Thanks Mr. Kenobi 😛

OBI-WAN: Oh, you’re perfectly welcome, sir.

(He pauses)

OBI-WAN: Oh, Force. I’m beginning to sound like C-3PO.

GANDALF: But were there any problems with this system? Was it possible that we just got lucky that none of us starved?

OBI-WAN: In my experience, there is no such thing as luck. Even if we had to wait for both of the people next to us to finish before we got to eat and they both took the maximum amount of time possible to eat, it would have only taken nine turns for our hunger to return to zero, since nobody could eat for more than three turns. It takes ten turns to starve, so there is no way we could have died. Although if I had died, I would have become more powerful than you could possibly imagine…

YODA:But perfect, out system was not. A more efficient way, there is.

GANDALF: Right. If the fourth person in line was waiting for the third and second people to finish, but the second person was waiting for the first, then the fourth person need not have waited for the first person as well as the second and third to finish. He could have eaten while the first person was eating. It saves time.

DUMBLEDORE: Mysterious thing, time. Powerful, and when meddled with, dangerous. Maybe we ought to take that into consideration if we ever have to do this again.

SPONGEBOB: I at first you don’t succeed, try, try again!!

YODA: NO!!! TRY NOT!!! DO… OR DO NOT!!! THERE IS NO TRY!!!!!

(A number of sarcastic expressions are cast in YODA’s direction)

DUMBLEDORE: So, do you think there is a perfect solution to this problem?

OBI-WAN: I suppose it depends on what you consider to be perfect. It’s impossible for any philosopher to not have to wait for utensils at all, since our hunger is completely random. But, technically, our original solution was perfect, since nobody could possibly starve. Unless Scratch proves to be as glitchy as the Millennium Falcon…

(HAN SOLO appears out of nowhere)

HAN SOLO: HEY! My ship’s saved your rebellion more times than I can count!!

OBI-WAN: With all due respect, Captain Solo, I hadn’t imagined that you could count very far.

(HAN SOLO storms away to pick on an easier target, presumably LUKE SKYWALKER)

(Suddenly, YODA notices HARRY POTTER standing behind a bush, taking notes)

YODA: A visitor we have, I say, hmmmmm?

DUMBLEDORE: Harry dear, you aren’t copying this down to use for Professor Snape’s homework, are you? I hear he has become very interested in CompSci since he first asked you all to turn to page 394 in binary.

(HARRY POTTER hides his tape recorder in his pocket)

HARRY: No sir! I’ll be going now, sir.

DUMBLEDORE: Good. Because we all know what will happen if you were cheating…

(Everyone looks expectantly at GANDALF)

GANDALF: YOU SHALL NOT PASS!!!!!!!!

 

 

Confused? Don’t be. This is the Chrono-Synclastic Infundibulum. Everyone is always right.

Have a nice day.

Sharanya out.

Assembly Code—Part 2

Artemis Fowl breathed a sigh of relief. Holly Short and the other fairies had managed to save him again. This time, they had recaptured the C-Cube, which had been stolen by Jon Spiro. Artemis was just glad that Spiro hadn’t noticed that the C-Cube wasn’t a supercomputer at all—it was a vending machine that dispensed fairy magic with the help of Assembly Code (which Artemis had cleverly marketed as The Eternity Code).

Since the fairies were going to wipe his memory in a few minutes (he wasn’t supposed to know about them in the first place), Artemis decided that he would put his last moments of memory to good use and think of how to improve his C-Cube. Perhaps he could incorporate an on/off switch. If the switch was turned on, a 1 would be loaded into the accumulator, and then the code would proceed to the next instruction, JMZ. It would then continue as he had originally written it. However, if the switch was turned off, 0 would be loaded into the accumulator. It would reach the next instruction, JMZ, which would cause a jump to an instruction later in the code. That instruction would be HLT, or halt. Thus, the Cube wouldn’t do anything if it was turned off.

A stock to keep track of how much fairy magic was still in the Cube sounded like a good idea. Artemis thought he could do this by using another location “A” to represent the stock. At the beginning of the Eternity Code, he could load the amount of fairy magic he had and store that value in location A. Then, later in the code, if the correct amount of money was inserted, as well as loading and storing 1 in the location representing product dispensed, he would subtract 1 from location A, so the Cube knew that it had one less unit of fairy magic in it now.

Artemis remembered that there were many types of fairy magic that he could dispense from the C-Cube. In order to dispense many types of magic, he would have to have different locations for each type of magic. Depending on the first number loaded into the accumulator, the code could choose the location in which to store the product output. If the first number was a 1, the code would continue in order and eventually reach an instruction that added 1 to the location representing the first product. If the first number input into the accumulator was 0, the code would JMZ to a later section of the code, which would eventually continue to an instruction that added 1 to the location representing the second product. Or, if he dispensed more than two types of magic, after the first JMZ, he could repeat the same process of loading 1 or 0 into the accumulator. Again, if 0 was loaded, the code would JMZ to a third section which would continue on and add 1 to the location representing the third product, and so on.

After doing all of this thinking, Artemis decided that he was tired of his Eternity Code. Assembly Code was so tedious to use, and there was only a finite number of things he could do with it. Everything had to be written out in terms of loading, performing an arithmetic operation, and storing, and it eventually got confusing trying to figure out how to use these simple commands to express more complex ideas. Even thinking in these terms got confusing, and he often forgot what he was trying to accomplish with each and every line of code. At least he had comments to help him with this problem. The abundance of LODs, STOs, ADDs and more were easier to wade through with comments that underlined the exact purpose for each line of code. By using comments, he knew why his code performed each instruction. Although the Cube preferred to read code, Artemis preferred English any day.

Artemis wondered why it had been so easy to convince Spiro that his assembly code vending machine was a supercomputer. It was probably because of the relationship between assembly code, operating systems, and higher level software. Assembly code uses the 1’s and 0’s and circuits of the hardware to function and in turn is used to write the operating system. The operating system then manages the higher level softwares that are running. It allots a certain amount of space for each software to use and makes sure that certain commands get priority over others.

 

 

Confused? Don’t be. This is the Chrono-Synclastic Infundibulum. Everyone is always right.

Have a nice day.

Sharanya out.

Assembly Code

Jon Spiro is having a very good day. He’s just stolen the C-Cube, a miniature supercomputer invented by thirteen year old genius Artemis Fowl, from Fowl himself. In order to make more Cubes, he has to figure out how they work. Sources tell him it uses the mysterious Eternity Code, but when Spiro looks closer, it seems a lot like Assembly Code to him…

The first thing he notices is the PC. The PC (Program Counter) keeps track of which instruction a computer is performing as a part of its instruction set. The circuit of the computer is wired so that upon performing a certain instruction, the PC will record which instruction number it has to perform next. Magical.

Next, the accumulator catches his eye. The ACC (Accumulator) is used to hold the results of instructions performed by the computer. He loaded the number 2. A 2 appeared in the accumulator. It’s almost like magic. Fairy magic…

The Cube seems to have an extraordinary ability to distinguish between a literal and a variable by the first digit of the binary number. If it is a 1, then the following numbers represent a variable. If it is a 0, then the numbers that follow represent a literal.

The computer is so powerful, Spiro decides to try to add with it. He tries to load the number in location X, add the number in location Y, and store the sum in location Z. First, he LOD (loads) the variable X. Then, he ADD (adds) the variable Y. Finally, he STO (stores) the sum in location Z.

LOD X;

ADD Y;

STO Z;

Fairy magic couldn’t be more powerful. Or could it?

Spiro looks out the window, then blinks. There is something outside, and it looks like a miniature human with wings. And it doesn’t look happy.

Yup. Definitely fairy magic.

 

 

Confused? Don’t be. This is the Chrono-Synclastic Infundibulum. Everyone is always right.

Have a nice day.

Sharanya out.

Truth Tables

On their quest to destroy the One Ring of Power and defeat the Dark Lord Sauron, the Companions of the Ring decide to pass through the perilous Mines of Moria. However, once they reach the West Gate, they realize that the only instruction for entry is the mysterious elvish inscription: “Speak friend and enter.” And then in fine print: “OR, do not speak friend or enter.” Luckily for the Companions, Gandalf paid very close attention back in his High School CompSci class, and he knows that the West Gate is an OR gate. He quickly constructs a truth table to figure out how to open the gate, representing “Speak friend” with A and “Enter” with B.

Then, Gandalf creates a circuit of the West Gate.

Using his truth table, Gandalf sees that the gate will open when A and B are both true, when A is false and B is true, and when A and B are both false, and the gate will remain shut if A is true and B is false. Thus, as long as the Companions do not speak friend and not enter, the gate will open. Hmmm… but they haven’t done either thing yet, so the gate must already be open…

 

Confused? Don’t be. This is the Chrono-Synclastic Infundibulum. Everyone is always right.

Have a nice day.

Sharanya out.