Monday 31 March 2014

tic tac toe - What is the optimal first move in tic-tac-toe?


I have been told that it is possible to guarantee no worse than a tie in normal 3x3 tic-tac-toe, but that the first move is very important. What is that important first move?



Answer



Tic-tac-toe has been solved. The optimal first move is to go in the corner.


As always, there is a relevant xkcd. xkcd tic tac toe


logical deduction - Council of Magic, 5 years later - more spellcasters, more deception


Council of Magic - 5 Years Later:
Five years ago, you managed to gain the support of the Council of Magic. However, now the King of Puzzlington needs their aid once again. As it worked last time, he sends you once again. However, 5 years have passed and things have changed. The old members of the council have retired and new ones have been elected.


There are now 5 types of spellcasters in Puzzlington: Wizards, Witches, Priests, Warlocks and Sorcerers. The first four work exactly the same as last time, but I'll repeat them here.


Wizards:
Wizards follow one of two paths: the path of Fire or the path of Water.
Wizards on the Path of Fire always tell the truth when asked a question.
Wizards on the Path of Water always lie when asked a question.


Witches:
Witches come in two styles: Light Witches or Dark Witches.

Light Witches tell the truth during the day and lie at night.
Dark Witches lie during the day and tell the truth at night.


Priests:
Priests worship one of two Gods: Yes, god of life or No, god of death.
When asked a question, instead of answering, priests just say their God's name.
That is, a Priest of Yes will always answer "Yes" to any question.


Warlocks:
Warlocks are unpredictable tricksters.
When asked a question, Warlocks will tell the truth or lie, as they wish.
However, Warlocks have now learned to withhold answers and remain silent.



Sorcerers:
Sorcerers draw their power from one of two star signs: Taurus or Gemini.
Taurus Sorcerers tell the truth if the question has an odd number of words.
Gemini Sorcerers tell the truth if the question has an even number of words.
Sorcerers will never lie; if the word count is wrong, they remain silent.


The Council:
The Council of Magic now consists of 6 powerful spellcasters. The spellcaster's names are Aries, Bandana, Cathy, Darrin, Eve and Francis. The Council has one Wizard, one Witch, one Priest, one Warlock and one Sorcerer; you do not know which Council member is which type of spellcaster.


In addition, the Council now has a High Mage. The High Mage can be any spellcaster type; however, you know the High Mage is not a Warlock. You do not know who the High Mage is or what spellcaster type they are.


You do not know the Path of the Wizard, Style of the Witch, God of the Cleric or Sign of the Sorcerer. You do, however, know the High Mage does not have the same sub-type as the other council member of the same type.


The members of the Council have full knowledge of each other. That is, they know which member is which type of spellcaster and which sub-type each is; they also know which member of the Council is the High Mage. The sub-type of a spellcaster is their Path, Style, God or Sign, as appropriate.



You arrive at the palace at noon. You can, once every 12 hours, ask any one member of the Council any one question that can be answered Yes or No (that is, after each question, it switches from night to day or day to night). If a spellcaster is asked a question they can't answer (because they don't know the answer), they remain silent. Priests are an exception to this rule; to them, their god is always the answer, no matter what the question.


The new Warlock hates you as much as the old one; when asked a question, they will choose to tell the truth or lie, whichever they think will hurt you the most.


Your task is the same as before. Learn the type and sub-type of all Council members as fast as you can; you will also need to learn the identity of the High Mage.




To list the changes carefully: There is a new spellcaster type that either tells the truth or says nothing, there is a duplicate spellcaster on the council and warlocks can choose silence.


I'm not yet sure how many questions it will take this time. More is all I can say with certainty.



Answer



I can do it in:



11 questions at most




background:



First, note that the theoretical minimum for the worst-case number of questions is 10. No strategy can ever require less than 10 questions in the worst case. Proof: Each question has 3 possible answers - yes, no or silence. A perfectly constructed question will evenly split all the remaining possible configurations at the time into 3 groups, corresponding with each answer, thus dividing the possibility space by 3. A perfect strategy will do this for each question. The number of possible configurations at the start = 6! * 2*2*2*2*4 = 46080. log(base3, 46080) = 9.77, therefore 10 questions is the theoretical minimum, whether it can be achieved is a different question ( I think it could be by improving my stage 1 questions, but I leave that to someone else).




Let's recap two important facts from the previous incarnation of this question. First, anyone who is known to either reliably lie or reliably tell the truth, can be forced to tell the truth with a nested question, e.g: "what would you say if I asked you "does 1+1=2?"". This can be used to extract truth from any of (wizard of any type, witch of any type, sorcerer of known type), which we'll call the target-group. Secondly , Etoplay's answer to the previous council of magic question (link at the top) contains a general strategy which I will use, which is optimal after you know the identity of someone in the target group. It's a 2-stage strategy: first use normal questions to establish a target-group member, then use what Etoplay calls the 'last few questions' to narrow down to the one true solution. Anyone who wants to understand this is advised to read Etoplay's answer as it's complex and I won't repeat it here.



strategy:




As mentioned, stage 2 of my strategy is the same as Etoplay's 'last few questions' section. The only thing remaining is to detail the first stage, along with logarithmic calculations for the number of questions required in each variation. Stage 1 proceeds as follows. Let the council members be numbered 1-6, let P = the number of possible configurations remaining. Calculating P is tricky combinatorics which I won't detail, but all values have been verified with a script.




first question, to person 1:
"If I asked the warlock whether two plus two equals four, what would he say?".
If silent: 1 is either witch, wizard or sorcerer of even-truth. All of these are in the target-group, so proceed to stage 2. P = 24000, ceiling(log(base3, P)) = 10, so 10 more questions required in this case, 11 total.
If not silent: 1 is either warlock or priest, with subtype depending on what the answer was. Now ask second question.
second question is the same, but to person 2:
If silent: 2 is in target group, move to stage 2. P = 7680 given everything we know, 9 more questions required, total 11.
If not silent: 2 is either warlock or priest, with subtypes depending on both answers. Now ask third question.

third question is the same, but to person 3:
If silent: 3 is in target group, move to stage 2. P = 1680 in the worst case (ie. first 2 answers were different). 7 questions required, 10 total.
If not silent: 3 is either warlock or priest, with person 1-3 subtypes highly narrowed down based on answers 1-3. Now ask question 4.
fourth question, to person 4:
"are you alive?"
if silent: 4 is a sorc of even-truth. move to stage 2. P = 32 given everything we know by now. 4 more questions required, 8 total.
If not silent: 4 is witch or wizard. move to stage 2. P = 64 based on everything we know. 4 more questions required, 8 total.



Sunday 30 March 2014

mechanical puzzles - Why does the 4x4 Rubik's cube have parity cases, while the 3x3 does not?


I'm a little uncertain as to why these two parity situations occur on the 4x4 Rubik's cube. The first parity case that can occur is this one, where an edge is simply flipped upside down:



enter image description here



The second one that can occur is this one, where two edges are swapped:



enter image description here




Neither of these are valid positions on a 3x3 Rubik's cube. I've been told something along the lines of "hidden pieces are out of place," but this doesn't make much sense to me. If this is a reasonable explanation, what are those virtual pieces, and why do they have to exist?


If not, what makes this a legal position on a 4x4 cube, and not a 3x3 cube?



Answer



The easiest explanation would be that in a 3x3 cube, only one cube is out of position, but in a 4x4 cube two cubes are out of position.


In a 15 puzzle (the sliding puzzle where you try to put the numbers in order) half of all possible initial positions are unsolvable. They call the solvable positions "even" and the unsolvable positions "odd". The "odd" positions are called that because there are an odd number of two-tile swaps (not sliding pieces) that need to be done (from the solved position) in order to generate that position.


The idea is similar with Rubik's cubes, though a little bit more complicated (only one in twelve of all positions are actually solvable, so there's more than just even or odd). Without getting into too much depth, you can simply think of the 3x3 cube being in an "odd" position because only one cube has changed, but the 4x4 cube is in an "even" position because two cubes have changed.


riddle - square number year, cube number day, when was I born?


At the year of a square number,
My age will be it's square root.
At the day of a cube number,
my month is it's cube root.
add the day and the month make them thirsty.


I'm still alive, when was I born ? (dd/mm/yyyy)



Answer




My attempt:



27/03/1980, 2025 is 45 squared, 27 is a cube, and 27+3=30 (thirsty)



Saturday 29 March 2014

word - Teapot riddle no.16 (fan made)


Teapot Riddle no.16 (fan made).
Proceed.





Rules:



I have one word which has several (2 or more) meanings.
Each of the meanings is a teapot (first, second ...).
You try to figure out the word with my Hints.



Note: I have decided to use American spelling as there are more people in America than Australia, and thus it is more likely that someone from America will view/answer this.



  • First Hint:


    My first teapot blows, and my second is rough.
    One opens or closes, with one not enough.




  • Second Hint:

    My first teapot chills out, but hates a pillow.
    My second gives thrills at the good copy's show.





  • Third Hint:

    My first teapot's fresh but its key is not new;
    Felt cold on your flesh, perhaps, if it pushed through.




  • Final Hint (to make it easy):

    My second likes paper, its edge not as straight;
    Whatever the flavor, it will soon update.






Good luck and have fun!
Last teapot riddle. Big thanks to @Jannis for making them!



Answer



To add onto @AHKieran


The answer is:



Draft/ (Draught)




My first teapot blows, and my second is rough. One opens or closes, with one not enough.



First teapot draft like a gust of wind, second like a draft in writing a paper or essay.



My first teapot chills out, but hates a pillow. My second gives thrills at the good copy's show.



first teapot, a draft of wind is often cold or chilly. Second teapot good copy refers to final draft that is shown or performed.



My first teapot's fresh but its key is not new; Felt cold on your flesh, perhaps, if it pushed through.




When a draft is string enough it can be felt through clothing and is cold on your skin.



My second likes paper, its edge not as straight; Whatever the flavor, it will soon update.



Many first drafts are done on paper and updated and changed over time.



riddle - What is the name of the board game? #2


This is a series of board game riddles, "Name the board game."
Previous riddle is here: What is the name of the board game? #1
Next riddle is here: What is the name of the board game? #3





From the given poem, name the board game.



Stubborn liver oh I quiver.
Hit my side, how I yell.
Brain is missing, put it back.
Get it right or I will tell.



What is the name of the board game?



Answer



I think the game is:




Operation



Explanation:



Liver and Brain are organs you might operate on.
Quiver, yell and tell are references to the noise made if you touch the side.



Friday 28 March 2014

enigmatic puzzle - “Tell Your Friends” - a mysterious e-mail that landed in my inbox [Part 4 of 6]


Now that you've managed to beat Part 3, we can move on to Part 4! Yey!




Immediately after entering the correct word in the prompt, you receive a new message on your screen...


Congratulations on solving Part 3! Now, we can proceed... 
This one should be pretty simple.

Deep within a tree, three brothers sit. In which order must they be hit?

Your mysterious host is waiting...





This puzzle was written by the person running the No Really It Is Me site. I have received permission from the OP to post this puzzle series.



Answer



I think it could be



2, 3, 1, since it's a reference to the Deku Scrub Brothers from The Legend of Zelda: Ocarina of Time, which need to be hit in that order to be defeated.



Thursday 27 March 2014

knowledge - Double features: The wrap-up


This puzzle is the final part of the Double feature series (first part here).

Note: This answers gives away the answers to previous puzzles.





enter image description here



The answers to the twelve Double feature puzzles are listed below. (Spoilers ahead – you've been warned twice now.) Use the answers and the given grid to answer the question: Where are we?



scariest monsters
mole species
unaccompanied solo

sauna's temperature
animal mitochondria
hasten foreclosure
more significant
mail shipment
arouse criticism
meal replacements
processing units
successive pairs





Answer



In each answer:



One of the two words anagrams to a national capital.



As hinted by the given image:



The capitals should be sorted from west to east. Then, every answer has a word left over, which should also be considered.



So, when this is done:




sauna's temperature - NASSAU, the bahamas / Temperature 77.4°W mail shipment - LIMA, peru / sHipment 77.0°W arouse criticism - ROSEAU, dominica / crIticism 61.4°W scariest monsters - CASTRIES, st lucia / monSters 60.9°W mole species - LOMÉ, togo / specIes 1.2°E successive pairs - PARIS, france / succeSsive 2.3°E processing units - TUNIS, tunisia / procesSing 10.2°E unaccompanied solo - OSLO, norway / unaccomPanied 10.7°E more significant - ROME, italy / significAnt 12.5°E hasten foreclosure - ATHENS, greece / foreclosuRe 23.7°E meal replacements - MALÉ, maldives / replacemenTs 73.5°E animal mitochondria - MANILA, philippines / mitochondriA 121.0°E

Reading down the diagonal of the remaining words (first letter of the first, second letter of the second, etc.) spells THIS IS SPARTA.



Sunday 23 March 2014

mathematics - The farmer and the olive trees


A farmer has a rectangular ground of 100 m by 50 m, he wants to plant olive trees, in sufficiently spaced ways (to avoid exhaustion by the roots) at least 10 meters from each other.


How much can one hope to put at the most, effectively?





Saturday 22 March 2014

mathematics - Make numbers 1 - 32 using the digits 2, 0, 1, 7


This is similar to the "Four fours" puzzle, but using the digits 2, 0, 1 and 7.


Rules:



  • Use all four digits exactly once

  • Allowed operations: +, -, x, ÷, ! (factorial), exponentiation, square root

  • Parentheses and grouping (e.g. "21") are also allowed

  • Squaring uses the digit 2 so expressions using multiple twos, like $2^2$ or $1^2 + 7^2$, are not allowed


  • Keep the order "2017" in at least 16 expressions (and more if you can!)


Good luck and Happy New Year!




Similar question for 2016



Answer



This answer has 29 expressions with the "2017" order. Those NOT in order are denoted by sadness - :(



$1=2*0+1^7$

$2=2^0+1^7$

$3=2+0+1^7$

$4=-2+0-1+7$

$5=-2+(0*1)+7$

$6=(2*0)-1+7$

$7=2^0-1+7$

$8=(2*0)+1+7$

$9=2+(0*1)+7$

$10=2+0+1+7$

$11=2+0!+1+7$

$12=(2+0)*(-1+7)$

$13=(2+0+1)!+7$

$14=(2+0!)!+1+7$

$15=-2+0+17$ (Improved for order by Ivo Beckers)

$16=-((2*0)!)+17$

$17=(2*0)+17$

$18=(2^0)+17$

$19=2+0+17$

$20=2+0!+17$

$21=20+1^7$

$22=-2+ (\sqrt{-(0!-17)})!$ (Improved by Pratheek B!)

$23=(2+0!)!+17$

$24=(2+0!)*(1+7)$

$25=(7-1-0!)^2$ :(

$26=20-1+7$

$27=20+(1*7)$

$28=20+1+7$

$29=27+(1+0!)$ :(

$30=10\sqrt{2+7}$ :(

$31=(2+0!+1)!+7$

$32=2^{-(0!)-1+7}$




FOOLING AROUND (I'm simply curious about how far we can go)



$33=17*2-0!$

$34 = (2+0)*17$ :D

$35=((2+0!)!-1)*7$ (Improved by Christoph!)

$36=(7-1+0)^2$

$37=20+17$ :D

$38=???$

$39=7^2-10$



Friday 21 March 2014

riddle - My father's gift on Christmas!



I bought my father a gift for Christmas and wrote a riddle for him to solve, but I thought I'd let you guys solve it first :D



I have caps that I cannot wear


You can enter without a care


Search for an exit, you will not find


But, I have space and an escape you're not confined


If you don't want to play we can come to an end


Send me home I won't contend


Though I have control you're in command


I'll patiently wait for my times are at hand.





Answer



Is it



a keyboard?



I have caps that I cannot wear



Caps Lock




You can enter without a care



Enter key



Search for an exit, you will not find
But, I have space and an escape you're not confined



Space and Esc keys



If you don't want to play we can come to an end




End key



Send me home I won't contend



Home key



Though I have control you're in command



Control.. or command on Macs




I'll patiently wait for my times are at hand.



"*" on num pad?



Thursday 20 March 2014

knowledge - On a puzzling spree


This puzzle is part 18 of Gladys' journey across the globe. Each part can be solved independently. Nevertheless, if you are new to the series, feel free to start at the beginning: Introducing Gladys.







Dear Puzzling,


I had a big, history-themed tour today. There are so many fascinating things to see that it can get pretty overwhelming.


I have to admit that lately I've been spending a lot of time on a relatively small area. I have to pick up the pace a little for the rest of the trip. The final destination is still far away.


The answer to this one consists of two common 6-letter words. Have fun!


Wish you were here!
Love, Gladys.






enter image description here


Across
1. Required for shooting
5. Webpage styling
8. Elementary's Watson
9. Where Europe ends
10. Not least
11. A long-legged Australian

12. Spoken in Southern China
14. King of tragedy
16. Not Unix
18. Gandalf actor and 007 creator
21. Between ready and fire
22. Dracula heroine
23. Knife strike
24. Parental Arabic letter


Down
1. The enemy of my enemy

2. Disappeared soldier
3. Personified inspiration
4. Not closeted
5. A First Nation
6. Halfling gardener
7. Insult
13. A foot or a stone
14. A foot or a hand
15. Fell for Vronsky
16. Type of astronomical giant

17. Danced with John to Chuck Berry
19. – and abet
20. Unhappy Arabic letter





Gladys will return in "Drums and punctuation".



Answer



The solved grid:



enter image description here

I've highlighted the two words making up the solution: MUSEUM ISLAND.



Some feedback on crossword cluing:



A lot of the clues don't really work according to regular crossword rules -- they describe actions that specific people do or qualities that something has, but don't really define it. For example, "Required for shooting" cluing AMMO -- that should be "Thing required for shooting". AMMO is a noun, so the clue has to be a noun too: in crosswords, clues should match in part of speech. Several of the clues here have this problem: 1A, 12A, 16A, 21A, 15D, and 17D.

Also, 2D and 5D have the opposite problems (cluing adjective answers as if they were nouns).

Some other nitpicks: Clues that define by examples (like 18A, 13D, and 14D) need to have something along the lines of "..., maybe", "..., perhaps", or "..., for some" at the end as well. 1D is a bit questionable as well, because the phrase being referred to specifically does not end in "ally".



Wednesday 19 March 2014

word - Teapot Riddle no.25 (fan made)


Teapot riddle rules:
I have one word which has several (2 or more) meanings.
Each of the meanings is a teapot (first, second ...)
You try to figure out the word with my Hints.


First:




My first teapot could be almost anything.



Second:



My second teapot is very specific.



Third:



My third teapot is quite the contrary.





Answer



Would you happen to be:



Object



My first teapot could be almost anything.



Object is a generic term for just about anything. Can you hand me that object on the table?




My second teapot is very specific.



An object is also classified as a goal or purpose, though typically referred to as an objective, it can be the former: The object of my reality is to become Hokage!



My third teapot is quite the contrary.



To object to something is to disagree with, which is quite the contrary.



Sunday 16 March 2014

story - Mithrandir has lost his keys!



Announcement: All puzzles are being delayed because my Puzzling notebook with all of my keys disappeared. :/ -- Mithrandir




Some hours after discovering this devastating loss, Mithrandir went to bed. Still moping over his missing notebook, he didn't notice the piece of paper on his pillow at first. But when he picked it up, he realised that it might contain the secret to getting his keys back!



So, Mithrandir, by this time you must have discovered the loss of your precious notebook. Cunningly hidden within this message is both the name of the person who stole it and the place where they've hidden it. (It was me, of course.) Mithrandir, if you figure out where I put your notebook, then you really are the master of puzzles. Oh, and don't forget to count. Never mind diamonds or powers of two or any of your other puzzles; this one should be easy. Succeed, and recover your notebook; fail, and it burns. That's all you've got. Enjoy the challenge, but you must hurry. Remember, I have your keys!



Frantically Mithrandir read the note again and again, trying to find the two hidden pieces of information within it. In case he doesn't manage to calm down enough to think about it logically, can you help him to find the hidden solution?


Who wrote the ransom note, and (more importantly) where is Mithrandir's notebook?



Answer



The who:



Take the first letter of each sentence to get Scimonster




The where:



Count the words in each sentence and use A1Z26: 15 22 5 18 6 18 9 4 7 5 ⇒ OVER FRIDGE



Saturday 15 March 2014

chess - Introducing: FootChess!


Imagine if your chess pieces got bored of their little war games, and decided to play something a bit different. The rules are like Chess except as follows:




  1. There is a Ball piece that starts in the center grid intersection, it is treated as being in D4,D5,E4,and E5; whichever piece first occupies any of those squares plays the Ball as if it were in the square they occupy.

  2. The Ball is played by any piece 'capturing' it. Instead of being captured, the ball immediately moves as a Neutral piece of the same variety that captured it, under the control of the capturer.

  3. If the Ball would capture a piece on this move, it is instead treated as if captured by it. This is called a Pass.

  4. Check and Checkmate are not relevant. Instead the game ends by moving the ball into the opposing goal; that being either D0, E0 or D9,E9. Pieces may not occupy these Goal Squares.


  5. All pieces may capture opposing pieces as Standard Chess, the exception being that a King may not be captured while on his home ranks, those being 1,2 for White, and 7,8 for Black.

  6. The Ball may be played by a pawn through either a capture move into its square, or by a standard move into its square. A pawn may play the Ball to a Capture square even if no Capture exists. Or a standard move sqaure even if there is a piece there. This means a pawn may always play the Ball to a square immediately or diagonally in front of itself, as well as two ranks directly in front of itself, if it is passed to while on its home rank.



That's all the rules, I think it's unambiguous, my friends and I have played at least 4 games, and no further clarifications have been necessary.


I've created a puzzle that uses these rules, based loosely on a position in one of the games with my friends. Your goal is to discover the path to victory. It is White's turn, and someone can win in five or fewer turns.


Disclaimer: Idea possibly stolen from @Alconja, sorry. It was unintentional, but I may have read it late one night and not remembered come morning. We also may have just had similar ideas... ¯_(ツ)_/¯


FootChess



Answer



Completed solution, expanded from @Techidiot, and assistance from @DennisJaheruddin and @dcfyj




White Bishop to G2, pass to Rook A8.
Rook must immediately pass;
If rook passes to White Queen, White wins
If rook passes to White Pawn, White puts the ball at B8
Rook can only safely put the ball at B8
enter image description here



Black's turn




Leaving the ball at B8, and not touching pawn A7 allows white to capture ball, promote and win Using rook to capture B8, and put ball at B7, allows white to capture ball with pawn, pass to Queen and win
Using rook A8 to capture A7, and leaving ball at B8, allows white to capture ball with Queen, pass to C8, and score next turn (black can't block)
Using rook D7 to capture A7, and leaving ball at B8, this is more complicated and continued subsequently.
Using rook to capture B8, and put ball at A8, this is more complicated and continued subsequently.



Two options for white's turn



enter image description here
In this case white capture Rook B8 with pawn A7 and promote to Queen. Black has no impactful moves in response, and the new Queen can capture the ball and pass to the other Queen to score. (Credit to user @dcfyj) enter image description here
White's response should likely be to take a rook. Either Bishop to A8, or Pawn to A7. Credit to @DennisJaheruddin for determining that Bishop to A8 is best enter image description here




Black's Turn - Credit to @DennisJaheruddin for exploring this



If the Black rook does not move, or moves to C7, White's Pawn can take it, and on White's next either the Pawn or Rook can capture the ball and pass to the Queen for a win
If rook goes to B7, it can be taken by the Bishop, and next turn the Queen passes to the Bishop for a goal, which black cannot prevent.
And if the black rook goes anywhere but A8, the Queen should capture the ball (B8), and put it at C8. This allows the Queen to score next turn which again cannot be prevented. If black chooses Rook to take Bishop A8 enter image description here



White's Move



White has Pawn to B7.

enter image description here
If black leaves the ball, or passes to it to the Queen or Pawn, White wins.
Black can only move to B8 put the ball at A8. In response white pawn takes A8 and promotes to Knight, sending ball to C7. The black rook can only take one of the Knight and the Queen, and the other scores next turn.



Friday 14 March 2014

word - Riddle with a twist


This is a riddle with a twist. Almost all the lines will point you in the right direction, but hidden somewhere in the riddle is a red herring. If you find the right solution, I'll accept your answer, but if you find the red herring and the right solution, I'll upvote and accept. Don't be afraid; the puzzle is still really easy. Good luck!


From the middle of the sun through all the rain,
Colours stretch from money to money.
The very first part of this,
Gives you my first word.


Not him, not it, perhaps his wife?
Or half of either of his parents?

Add to that the precious thing,
Not the three, the seven, or the nine,
To get at last my second word.


Who or what am I?



Answer



You are



a red herring



Explanation:



From the middle of the sun through all the rain,


The red herring line; doesn't affect the answer.



Colours stretch from money to money. 
The very first part of this,
Gives you my first word.



"This" refers to the previous line itself. The very first part of the line is "colours", which, when combined with the rest of the answer, naturally yields RED.



Or, alternatively, thanks to @dmg:



Could refer to a rainbow. "Money to money" meaning the pot of gold at the end of a rainbow. And the first part of the rainbow is red.



Not him, not it, perhaps his wife?
Or half of either of his parents?



HER (Not him or it, half of motHER or fatHER)



Add to that the precious thing, 
Not the three, the seven, or the nine,
To get at last my second word.


RING (Lord of the Rings reference)



Wednesday 12 March 2014

logical deduction - Difference Triangle


The numbers 1 through 6 are arranged so that any number resting between and below two other numbers is the difference between those two numbers. A square between 2 adjacent circles means the difference is 1.


enter image description here


Using numbers 1 through 15, fill in the circle's below to create a "difference triangle" with the same conditions.


enter image description here



Answer



The solution is:



Solution




We'll mark the empty circles with letters for ease of reference: enter image description here


Now note that:



$I$ cannot be $9$, else $F$ would have to be $17$. So $I=7$. Also, $F$ is the difference between two consecutive number (joined by a square), so $F=1$. This also means that $G$ is one more than $J$.
enter image description here



Now observe:



since $|7-J|=4$, $J$ could be $3$ or $11$. But $J$ being $3$ forces $G=4$, which is already used, so $J=11$. $M$ can be $3$ or $5$; however, $M=3$ means $L=1$ or $7$, both of which are used; so $M=5$. This means $L=9$, and $K=2$.

enter image description here



At this point,



$H$ could be $10$ or $14$; but $H=14$ means $D$ and $E$ are $1$ and $15$ in some order, but $1$ is used. So $H=10$.
enter image description here



Now note that:



we need a pair of consecutive numbers in the top row for $B$ and $C$. The only such pairs left are $13,14$ or $14,15$. But $B$ can't be $13$ or $15$; since that would force $A$ to be $5$ or $7$, both of them already in the grid. So $B=14, A=6$. The rest is easy enough to guess and check, which leads us to the solution presented above.




Tuesday 11 March 2014

enigmatic puzzle - "Tell Your Friends" - a mysterious e-mail that landed in my inbox [Part 2 of 6]


Following the mystery embedded in the initial puzzle...





Note: Sorry, I messed up. I've re-uploaded the image in PNG format. Quality should be back.




Congratulations! Through much hard work, you've managed to solve the initial puzzle and have apparently pleased your unknown host, who sends his regards and more instructions:



Congratulations. You've passed the first test.


Each level from here on out will contain a hidden message of some kind. Good luck, and keep your wits about you. Only five more challenges to go.


Level 2: https://www.noreallyitis.me/FF0A86.png
[Ed. Note: The link is dead now, but the below image is a mirror hosted on Imgur. It should suffice for this challenge]



Imgur


Not wanting to disappoint your mysterious host, you get to work.





Note: This puzzle was not created by me, but it does have a known solution now. I've received permissions from the original author (me@noreallyitis.me) to upload them here.



Answer



The photo says:



Codebreaker



Because:



Clue The letters are an anagram




Monday 10 March 2014

Card probability problem



You have three cards in a hat. One is white on both sides, one is red on both sides, the third is white on one side and red on the other. You pull a card out of the hat and lay it down. The face is white. What are the chances that the other side of the card is also white?


Edit: to those who have marked this as a duplicate, I invite you to explain how it can be so when the answer in the "duplicate" is different from this one.




Answer



I think the correct answer is



2/3



We use the law of conditional probability.



Let $WW$ be the event that we get the all-white card, $RW$ the mixed card and $RR$ the all-red card. Let $W$ be the event that we get a white face up when we pull a card from the bag.

The law of conditional probability gives us $$P(WW \mid W) = \frac{P(WW \cap W)}{P(W)} = \frac{1/3}{1/2} = \frac{2}{3}$$ as $P(WW \cap W)$ simply reduces to the probability that we drew the all-white card, and half the faces are white, so $P(W)$ is a half.



Sunday 9 March 2014

Some more rebus puzzles


I have some more Rebus puzzles:


enter image description here


Seeing how the first lot were a bit easy I decided to make these a bit harder. Good luck!


HINT FOR 3:



It has something to do with the fact that they are numbers i.e letters wouldn't work




Hint for 3 and 4:



For 4, it has something to do with the positioning of a certain letter/letters. For 3, there is no summing involved and the underlining just under lines the last number





Next lot: Even more rebus puzzles!



Answer



Community wiki:


The first one is




Walking on thin ice (walking = stick figure, on = position, thin ice = 'th' in 'ice')



The second one is



Sitting duck



The third one is



Last but not least




The fourth one is



High L and S = highlands (answer by OP)



The fifth one is



Back out



The sixth one is




Hole in one



knowledge - Keeping you safe


Complete the grid and find a two-word final answer.



cryptic crossword




Across



1. Ability to move first to northern aristocracy (8)
4. Animal to rip a short tail back (5)
5. Oral tradition about the origin of Indus river (5)
6. Heart of Azerbaijan; first khanate's head, then urban capital (4)
7. Exclude a note during overtime (4)
8. Turn captain's first military status (5)
9. Sea navigation's start in Laos retreat is dependent on time of year (8)




Down



2. Capable holding Arizona on fire (6)
3. Counselor in front of workable central triumvirate (6)





This puzzle is part of Recycling old answers.



Answer



GRID:




grid



Thanks @Hexonimo for the hint! The two word answer is found by



Diagonal Top left to Bottom right is NATIONAL
Diagonal bottom left to top right is SECURITY




  1. Ability to move first to northern aristocracy (8)


    NO + BILITY




  2. Animal to rip a short tail back (5)

    TAPIR




  3. Oral tradition about the origin of Indus river (5)


    LO(I)RE




  4. Heart of Azerbaijan; first khanate's head, then urban capital (4)

    BA+ K +U




  5. Exclude a note during overtime (4)


    O(MI)T




  6. Turn captain's first military status (5)

    C + RANK




  7. Sea navigation's start in Laos retreat is dependent on time of year (8)


    SEA +SO(N)AL (El-Guest beat me to it, but we solved it independently)





Down



  1. Capable holding Arizona on fire (6)

    ABL(AZ)E





  2. Counselor in front of workable central triumvirate (6)

    TROI+ KA - Star Trek, The Next Generation Counselor Deanna Troi





Friday 7 March 2014

wordplay - I make billions (#5)



I make bullions balloons billions (#5)


Main clues:




  • These statues are wonderful! I'm going to invest in the sculptor.

  • Move faster! I need to finish the 18th hole and return this golf club before noon.


Additional clues related to clue #2, sorted by importance:



  • Our band's music is testosterone fueled. We will be more iconic than Nirvana!

  • I'm trying to move faster but I need to do it in a smart way.

  • Keep your head down! Our enemy relishes the chance to take a pot shot at us.

  • When I put on my wizard hat, my clothes make me look disheveled and tired.


  • I'm not joking! You'd better not get in my way.

  • I love the sound of making money.

  • The last time I watched the Winter Olympics was over 20 years ago.


Seven more clues related to clue #2:



  • Oops I broke your sword in two. I have some posters of what it used to look like.

  • As a person who baits sharks, I can tell you that sharks love cough drops for some reason.

  • Before sonar was invented, we would get trapped in tight crevices in our submarine. We would have to push obstacles out of the way to escape.

  • Did you know banshees can kill a person with their voice? Better avoid their greetings.


  • My archaeological dig found dental twine made of otter pelts, and a drinking mug made of a skull.

  • My son has a passion for books. I bought him a reading system that he got hooked on when he was young.

  • I love eating whole chickens. I have a gizzard phobia though.


Who / what am I?



Hunt Hint:



Each clue can be shelved solved on its own. Solving any one clue can lead to the final answer. After getting the final answer, solving the rust rest of the clues should be macho much easier.




Hint 2:



I recommend trying to solve clue #2. In my opinion, it is the easiest of the clues and will unlock all the other clues when you figure it out. In the meantime I added some italics to all the clues to make them easier to solve.



Hint 3:



Clue #1 is not like the others. Do that one last. I modified clue #2 and added italics to it. I also added 8 more clues and grouped them into 3 groups. It's only a matter of time before someone gets it now. The final answer should be a person who is known for clue #1 and clue #2. But I'm expecting a correct answer to solve each other clue as well.



Previous puzzles in this series: #1 #2 #3 #4



Answer




I think I've cracked it... I believe the answer is:



JK Rowling, author of the Harry Potter series



Since:



All of the clues from #2 onwards point towards words which sound like misspellings of character names and book titles in the Harry Potter series.



In particular, clue #2 "Move faster! I need to finish the 18th hole and return this golf club before noon." gives us:




HURRY and PUTTER --> HARRY POTTER



Other clues resolve as follows:



3. Our band's music is testosterone fueled. We will be more iconic than Nirvana! = HORMONE and GRUNGIER --> HERMIONE GRANGER
4. I'm trying to move faster but I need to do it in a smart way. = RUN and WISELY --> RON WEASLEY
5. Keep your head down! Our enemy relishes the chance to take a pot shot at us. = SAVOURS and SNIPE --> SEVERUS SNAPE
6. When I put on my wizard hat, my clothes make me look disheveled and tired. = ROBES and HAGGARD --> RUBEUS HAGRID
7. I'm not joking! You'd better not get in my way. = SERIOUS and BLOCK --> SIRIUS BLACK
8. I love the sound of making money. = CHER-CHING --> CHO CHANG

9. The last time I watched the Winter Olympics was over 20 years ago. = NAGANO --> NAGINI



Section 3:



('Harry Potter and the...' book titles):
10. Oops I broke your sword in two. I have some posters of what it used to look like. = HALF-BLADE and PRINTS --> HALF-BLOOD PRINCE
11. As a person who baits sharks, I can tell you that sharks love cough drops for some reason. = CHUMMER and SUCRETS --> CHAMBER OF SECRETS
12. Before sonar was invented, we would get trapped in tight crevices in our submarine. We would have to push obstacles out of the way to escape. = PRE-SONAR and SOKOBAN (look it up!) --> PRISONER OF AZKABAN
13. Did you know banshees can kill a person with their voice? Better avoid their greetings. = DEADLY and HELLO'S --> DEATHLY HALLOWS
14. My archaeological dig found dental twine made of otter pelts, and a drinking mug made of a skull. = FLOSS OF FUR and STEIN --> PHILOSOPHER'S STONE

15. My son has a passion for books. I bought him a reading system that he got hooked on when he was young. = ARDOUR and PHONICS --> ORDER OF THE PHOENIX
16. I love eating whole chickens. I have a gizzard phobia though. = GIBLET and FEAR --> GOBLET OF FIRE



Returning to clue #1 (These statues are wonderful! I'm going to invest in the sculptor.), this gives:



BUSTS and FUND --> FANTASTIC BEASTS AND WHERE TO FIND THEM. This is another of JK Rowling's series set in the Wizarding World.



This all fits with the theme since:



Rowling's Harry Potter and Fantastic Beasts franchises have made billions from the sale of books and the accompanying movie series.




Thursday 6 March 2014

rebus - Nutter, Nutter, Peanut Butter


What's this then?


private function pick():void {
var sample:Array = ["Coconut", "Chocolate Covered Peanuts", "Caramel",
"Chocolate Covered Almonds", "Chocolate Whip", "Pecan & English Walnut Cluster",
"Molasses Chew", "Messenger Boy", "Almond Nougat", "Cashew Cluster",
"Chocolate Truffle", "Toffee", "Cherry Cordial", "Maple Fudge"
];
var i:int = Math.random() * (sample.length) + 0;
var existence:String = sample[i];

}

Answer



It's something my mother used to tell me:



Life is like a box of chocolates. You never know what you're going to get!



Explanation:



Life is a synonym for existence; the array is the box of chocolates; picking a random one basically means you don't know what you're going to get; and the quote is from Forrest Gump.




mathematics - Dinosaur Egg Drop v2


This question is a little different and kinda follow-up version of Dinosaur Egg Drop


1- You have 100 story building and 6 Apatosaurus dinosaur eggs.


2- You have 81 story building and 3 Massospondylus dinosaur eggs.


In both cases, you would like to find these different kind of dinosaur eggs durabilities (I don't know why you need to test it though, crazy scientists).


So at least how many times do you need to drop the eggs to find at which highest floor the eggs do not break in the worst case scenario for each case?



Answer



Even if the generalised question is already answered by Mike Earnest, let me put here this method which reaches the same conclusion without a recursive approach



Let me rephrase the question into the following form (just as Mike did):



Given $eggs$ number of eggs with identical durability, and $throws$ number of maximal attempts, what is the maximal number of stories for which we can identify the durability?


If we note this value with $stories(eggs,throws)$, the original two questions can be rephrased as: what is the smallest value of $throws$, for which



  1. $stories(6,throws)\ge100$;

  2. $stories(3,throws)\ge81$?



Sure $stories(eggs,throws)$ can be found by solving the recursion, but there is another way to do that: the results of the sequence of our attempts can be coded by binary sequences that indicate if an egg was broken (marked with 1) at an attempt or not (marked with 0).

A possible code is either



  • exactly $throws$ digits long, with at most $eggs-1$ of them being 1s (marking the cases when we ran out of attempts, but had eggs left), or

  • at most $throws$ digits long, the last one being 1 and another $eggs-1$ being 1 as well (marking the cases when we ran out of eggs).


So for example if we had 5 attempts and 2 eggs, possible codes look like 00100 (the egg thrown on the third attempt broke), or 011 (the eggs thrown on second and third attempts broke, leaving us with no more eggs).


An optimal strategy results in different codes belong to different durabilities. So the question got reduced to how many different codes are there?


The first type gives: $\sum\limits_{i=0}^{eggs-1}\binom{throws}{i}$, the second type gives: $\sum\limits_{j=eggs}^{throws}\binom{j-1}{eggs-1}=\binom{throws}{eggs}$.


At this point it is worth noting, that the all-0 word is not a valid code, as it does not allow us to determine the durability. In practice it means, that even if we throw an egg from the topmost story, it does not break. Excluding it means that the first sum's term of $i=0$ is removed.


Adding these together we get $\sum\limits_{i=1}^{eggs}\binom{throws}{i}$.



This is already the very same expression that Mike had, so no wonder, that the actual cases give the same results:




  1. The minimal $throws$ value for which $\sum\limits_{i=1}^{6}\binom{throws}{i}\ge100$ is 7:
    for 6 the expression gives $\sum\limits_{i=1}^{6}\binom{6}{i}=2^6-\binom{6}{0}=63$;
    for 7 it is $\sum\limits_{i=1}^{6}\binom{7}{i}=2^7-\binom{7}{0}-\binom{7}{7}=126$.

  2. The minimal $throws$ value for which $\sum\limits_{i=1}^{3}\binom{throws}{i}\ge81$ is 8:
    for 7 the expression gives $\sum\limits_{i=1}^{3}\binom{7}{i}=\binom{7}{1}+\binom{7}{2}+\binom{7}{3}=63$;
    for 8 it is $\sum\limits_{i=1}^{3}\binom{8}{i}=\binom{8}{1}+\binom{8}{2}+\binom{8}{3}=92$.




pattern - Sunset Parliament Sacrificing Posers



This was inspired when I tried to solve BmyGuest's Owls at sunset - find the odd one out


Similar to that group, these birds have gathered prior to a hunt albeit an evening hunt instead of a dawn foray. However, the Strigiformes gathered here have a different group system. Not only do they have different rules to follow, but they don't mess around with sho-who-whoing outsiders away. Imposters are torn to shreds and fed to the hawks as payment for staying out of the owls' hunting area. Sadly, this has not led to increased security. This group has two outsiders in their midst.



Can you identify the two owls behaving anti-socially (I.E. not following the parliament rules) in the image below? What is the rule?



A valid answer must contain the parliament rule and why those particular owls are not following it. The puzzle can be solved with a black-and-white printout of the image.


Different-Owl-Picture-Hi-BmyGuest-I-Hope-You-Like-This-Shoutout


Note 1: In the column labels, I skipped the letter I on purpose to avoid confusion with the number 1. It is not a clue.


Note 2: BmyGuest found a valid pattern that I missed. The owls he found are, in fact, the odd birds out. I have since changed those two bird eyes such that they are still outside the intended pattern but no longer fall under the pattern BmyGuest found. I have delivered +1 to that answer nonetheless.





The one two and only hints:



I added a row of owls simply because I liked how the pattern broke there. It doesn't really matter how many owls there are. The pattern holds up for any positive natural number of owls. Therefore, they must be following a pattern or series.





There are 64 possible eye pairs. Only 30 are valid and only 18 are used in the picture.




Answer



The odd ones out are




A2 and D7



Explanation:



The pattern is semaphore. Use the directions of each owl's eyes as the positions of the flags.



HUSHLITTL
OBABYDONT
SAYAWORDM

AMASGOING
TOBUYYOUA
MOCKINGBI
RDITTHATM
OCKINGBIR
DWONTSING

These are the lyrics to the lullaby "Hush Little Baby".

A2 and D7 are the wrong letters. A2 should have looked south, northeast, and D7 should have looked south, east.


rhyme - What's the hidden word within the poem?


Hidden within the following poem is a word. I would provide more clue as to how to decipher each letter in the word, but perhaps I'm already giving away too much. Let's see if you can get it!



If I revealed, in genuine, the depths of my desire,



I’d understand your hesitance, you likely would be shyer.


So I should lie wholeheartedly. But should I? Would I try,


if knowing that there’s one way through – by seeing eye to eye –


and we misstep. There’s nothing left, but dignity. Why lie


when dominance, incontinence are falling rather flat


(just like you) is pretty now at least you aren’t fat.




Answer




Take the number of words in each sentence and use A1Z26 encoding to convert the numbers to letters. Doing so gives SECRET.




wordplay - Witches on the wall


Witches on the wall wait for the rain of answers to fall! witches



Answer



First group



Foods

• I am witch on a beach (8): sandwich
• Zoro hit me twice a quarter after 3. (5): pizza (pi is after 3, two zz from zorro's sword)
• Hand me a bag of 50 (5): bagel (L is roman numeral for 50)
• Get a spa with a tea (8): spaghetti (spa, get + tea). This is 9, but I think it is correct.




Next group



Mistake

• Witch misses the stake (7): mistake
• I am in terror (5): error (is in the word terror)
• I are not a giraffe (5): gaffe (means a mistake, a blunder) - take the I and R (are) out of giraffe.
• Flair with no err (4): remove the "r" from "flair" and you have an anagram of fail, err sounds a bit like "r", could also refer to "failure" (fail + err)



Third group




Traits / attributes necessary to be good at something

• Let it be rain (5): brain (B+rain) - I wasn't convinced by this, but @MOehm made a decent case for it.
• Say no legend (9): knowledge (say "no legend" and you hear knowledge)
• End the tall (6): talent (tall + end)
• Kill the snake (5): skill the s is like a snake, and added the kill.



Final group, least certain here:



Relating to living arrangements

• Oh, no R. (5): owner (thanks for the freebee - as soon as you told me it was so obvious!)
• A ghost has no age (4): host (take a "g" out of ghost)
• Who would have guessed? (5): guest

• Ten ants running on the floor. (6): tenant



Saturday 1 March 2014

pattern - Find the two master lock combinations


Jeremy is a store owner. He uses combination locks like the one below at all of his store locations to secure cabinets of semi-important documents. Each combination is made up of 3 numbers, each between 0 and 39, inclusively.


enter image description here


Over the years as he built more stores, Jeremy developed a system for remembering the combination at each store location. His secret: He associates a trip with each combination.


Here are a couple of examples:


For his original store, the trip he remembers is



Belgium --> Germany --> France, and the combination is 10-17-29.



For his second store, the trip he remembers is




Saudi Arabia--> Iran --> Qatar, and the combination is 38-13-35.



You work at Jeremy's new location, and the cabinet there has 2 combination locks on it. He is always looking for people with excellent problem-solving skills to promote to top managerial positions within the company. With that in mind, he has told you which trips he associates with each lock. Knowing his motivation, you would love to be able to figure out both of the combinations and get a much better job.


The trip for lock #1 is



Brazil --> Chile --> Argentina



The trip for lock #2 is




Everywhere --> Nowhere --> Home



The numbers correspond to the areas traveled, and they are in order. Each area traveled has one and only one number associated with it. The process is not super complicated. It doesn't require arithmetic mod and it doesn't require knowledge of provinces, states, zones, or regions. In response to Oren's comment, all countries and many other areas (except 5 of them, which is an unimportant detail), can be turned into a valid number.


Tip: Ignore lock #2 at first, and when you have figured out a method, apply it to lock #1. Then, apply a small amount of practical/creative/lateral thinking (not calculation, as for the other locks) to get lock #2.


EDIT: Extra Info: Jeremy is horrible at spelling, but he is great at remembering short nicknames, abbreviations, and the like.


What are the 2 combinations, and why?




Answer



Posting Cerberus' explanation verbatim to explain the rules required to understand lock 1 (and so multiple answers don't have to be referenced).



You need to take the three-letter code of each country and calculate the 'distance' (d) between 2 consecutive letters, and finally add them.




Belgium --> Germany --> France



BEL --> DEU --> FRA
d(B,E) + d(E,L) = 3 + 7 = 10
d(D,E) + d(E,U) = 1 + 16 = 17
d(F,R) + d(R,A) = 12 + 17 = 29



Saudi Arabia --> Iran --> Qatar




SAU --> IRN --> QAT
d(S,A) + d(A,U) = 18 + 20 = 38
d(I,R) + d(R,N) = 9 + 4 = 13
d(Q,A) + d(A,T) = 16 + 19 = 35



That means that Brazil --> Chile --> Argentina



BRA --> CHL --> ARG
d(B,R) + d(R,A) = 16 + 17 = 33
d(C,H) + d(H,L) = 5 + 4 = 9

d(A,R) + d(R,G) = 17 + 11 = 28
so the code is 33-9-28





Quark's solution to Lock 2:



Nowhere is 0, Everywhere is 39, and Home is 1.



/* Author: Quark */


#include
#include

int main()
{
char code[4];
int number[3];
int value;
int i;
int zero=0,one=0,two=0,three=0,four=0,five=0,six=0,seven=0,eight=0,nine=0,ten=0,

eleven=0,twelve=0,thirteen=0,fourteen=0,fifteen=0,sixteen=0,seventeen=0,
eighteen=0,nineteen=0,twenty=0,twentyone=0,twentytwo=0,twentythree=0,twentyfour=0,
twentyfive=0,twentysix=0,twentyseven=0,twentyeight=0,twentynine=0,thirty=0,
thirtyone=0,thirtytwo=0,thirtythree=0,thirtyfour=0,thirtyfive=0,thirtysix=0,
thirtyseven=0,thirtyeight=0,thirtynine=0,fourty=0,over = 0;

while(1){
gets(code);
if(code[0]=='0')
printf("%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d\n", zero,one,two,three,four,five,six,seven,eight,nine,ten,

eleven,twelve,thirteen,fourteen,fifteen,sixteen,seventeen,
eighteen,nineteen,twenty,twentyone,twentytwo,twentythree,twentyfour,
twentyfive,twentysix,twentyseven,twentyeight,twentynine,thirty,
thirtyone,thirtytwo,thirtythree,thirtyfour,thirtyfive,thirtysix,
thirtyseven,thirtyeight,thirtynine,fourty,over);

for(i=0;i<3;i++)
{
if (code[i] >= 'A' && code[i] <= 'Z')
number[i] = code[i] - 'A' + 1;

else if (code[i] >= 'a' && code[i] <= 'z')
number[i] = code[i] - 'a';
}
value = abs(number[0]-number[1]) + abs(number[1]-number[2]);
printf("%d\n", value);
switch(value)
{
case 0:
zero++;
break;


case 1:
one++;
break;

case 2:
two++;
break;

case 3:

three++;
break;

case 4:
four++;
break;

case 5:
five++;
break;


case 6:
six++;
break;

case 7:
seven++;
break;

case 8:

eight++;
break;

case 9:
nine++;
break;

case 10:
ten++;
break;


case 11:
eleven++;
break;

case 12:
twelve++;
break;

case 13:

thirteen++;
break;

case 14:
fourteen++;
break;

case 15:
fifteen++;
break;


case 16:
sixteen++;
break;

case 17:
seventeen++;
break;

case 18:

eighteen++;
break;

case 19:
nineteen++;
break;

case 20:
twenty++;
break;


case 21:
twentyone++;
break;

case 22:
twentytwo++;
break;

case 23:

twentythree++;
break;

case 24:
twentyfour++;
break;

case 25:
twentyfive++;
break;


case 26:
twentysix++;
break;

case 27:
twentyseven++;
break;

case 28:

twentyeight++;
break;

case 29:
twentynine++;
break;

case 30:
thirty++;
break;


case 31:
thirtyone++;
break;

case 32:
thirtytwo++;
break;

case 33:

thirtythree++;
break;

case 34:
thirtyfour++;
break;

case 35:
thirtyfive++;
break;


case 36:
thirtysix++;
break;

case 37:
thirtyseven++;
break;

case 38:

thirtyeight++;
break;

case 39:
thirtynine++;
break;

case 40:
fourty++;
break;


default:
over++;
break;

}
}
return(1337);
}


Running this code with a list of country codes returns:


AFG
6
ALA
22
ALB
21
DZA
47
ASM

24
AND
23
AGO
14
AIA
16
ATG
32
ARG

28
ARM
22
ABW
22
AUS
22
AUT
21
AZE

46
BHS
17
BHR
16
BGD
8
BRB
32
BLR

16
BEL
10
BLZ
24
BEN
12
BMU
19
BTN

24
BOL
16
BIH
8
BWA
43
BRA
33
VGB

20
BRN
20
BGR
16
BFA
9
BDI
7
KHM

8
CMR
15
CAN
15
CPV
19
CYM
34
CAF

7
TCD
18
CHL
9
CHN
11
HKG
7
MAC

14
COL
15
COM
14
COG
20
COK
16
CRI

24
CIV
19
HRV
14
CUB
37
CYP
31
CZE

44
PRK
9
COD
23
DNK
13
DJI
7
DMA

21
DOM
13
ECU
20
EGY
20
SLV
17
GNQ

10
ERI
22
EST
15
ETH
27
FRO
15
FLK

7
FJI
5
FIN
8
FRA
29
GUF
29
PYF

28
GAB
7
GMB
17
GEO
12
DEU
17
GHA

8
GIB
9
GRC
26
GRL
17
GRD
25
GLP

9
GUM
22
GTM
20
GGY
18
GIN
7
GNB

19
GUY
18
HTI
23
VAT
40
HND
16
HUN

20
ISL
17
IND
15
IDN
15
IRN
13
IRQ

10
IRL
15
IMN
5
ISR
11
ITA
30
JAM

21
JPN
8
JEY
25
JOR
8
KAZ
35
KEN

15
KIR
11
KWT
15
KGZ
23
LAO
25
LVA

31
LBN
22
LSO
11
LBR
26
LBY
33
LIE

7
LTU
9
LUX
12
MDG
12
MWI
24
MYS

18
MDV
27
MLI
4
MLT
9
MHL
9
MTQ

10
MRT
7
MUS
10
MYT
17
MEX
27
FSM

19
MDA
12
MCO
22
MNG
8
MNE
10
MSR

7
MAR
29
MOZ
13
MMR
5
NAM
25
NRU

7
NPL
6
NLD
10
ANT
19
NCL
20
NZL

26
NIC
11
NER
22
NGA
13
NIU
17
NFK

13
MNP
3
NOR
4
PSE
17
OMN
3
PAK

25
PLW
15
PAN
28
PNG
9
PRY
9
PER

24
PHL
12
PCN
24
POL
4
PRT
4
PRI

11
QAT
35
KOR
7
REU
29
ROU
9
RUS

5
RWA
27
BLM
11
SHN
17
KNA
16
LCA

11
MAF
17
SPM
6
VCT
36
WSM
10
SMR

11
STP
5
SAU
38
SEN
23
SRB
17
SYC

28
SLE
14
SGP
21
SVK
14
SVN
11
SLB

17
SOM
6
ZAF
30
ESP
17
LKA
11
SDN

25
SUR
5
SJM
12
SWZ
7
SWE
22
CHE

8
SYR
13
TJK
11
THA
19
MKD
9
TLS

15
TGO
21
TKL
10
TON
6
TTO
5
TUN

8
TUR
4
TKM
11
TCA
19
TUV
2
UGA

20
UKR
17
ARE
30
GBR
21
TZA
31
USA

20
VIR
22
URY
10
UZB
29
VUT
2
VEN

26
VNM
9
WLF
17
ESH
25
YEM
28
ZMB

24
ZWE
21
0
0 0 2 2 5 7 5 13 10 13 10 13 7 7 6 12 8 16 4 8 10 8 11 5 8 7 4 4 5 5 3 3 2 2 1 2 1 1 1 0 1 4
21


Note: the leading 0 and following 21 is the command to print results and result of the print result commands respectively (this explanation is as messy as the code). TL;DR, the solutions from 0,1,2,...39,40,OVER, are listed in the long number line.

As you can see from my beautifully crafted code, (I bet this'll make some programmers puke, I did it just to test my regex skills), the only 0's are for variables zero, one, and thirtynine, meaning these are the only ones that can't be represented by a country code. Zero and thirtynine correspond to nowhere and everywhere intuitively being none and every, and one is the loneliest number sitting at home. (basically from process of elimination)






Answer for Lock 2:



For the system to work, every number has to be able to be represented otherwise he needs another system when combinations include 0/1 etc. Also, there should be no reason to break the pattern of using country code abbreviations if he didn't have to, so all three should represent numbers that can't be made with country abbreviations. Assuming this link is used for codes, 2 can be made with RSR, and 3 can be made with OMN, (the rest have multiple), meaning there is none for 0 or 1. To associate these with nowhere and everywhere, I'd say 0 is nowhere and 1 is everywhere. Home could then be either actually home, or one other number that can't be made. I don't know if I should write some code to convert these to numbers though without confirmation.



word - Twelve Labours - #01 Nemean Iron


This puzzle is part of the ‘Twelve Labours’ series. Previous instalments can be found here: Prologue




Having finally deciphered his mother’s map, Hercules got dressed, wolfed down some breakfast and headed across the road to Nemean Iron, the dry cleaners. As he opened the door, a bell tinkled and a few seconds later the tiny, aged proprietor limped forward to the counter.


“Well, well... I swear you’ve grown since the last holidays, young Hercules,” chuckled Molorchos, a wrinkled prune of a man dressed almost entirely in wool. His eyes twinkled behind thick spectacles and Hercules smiled back.


“You’re sure it’s not you that’s shrunk?!” Hercules joked back. It was the same banter they exchanged every time they saw each other, and it still made both of them laugh despite its many (many) retellings.


“Still got that cheeky wit, I see,” said Molorchos. “Typical Libra. Have you read your horoscope for today? It’s a good one – the stars always have the answers...”



Molorchos slid a sheet of paper across the counter to Hercules. It appeared to have been cut out of a newspaper.


“No, thank you, Molorchos. I don’t believe in that,” said Hercules as politely as possible, sliding it back. “Anyway, Mum sent me on an errand – apparently she sent an item here to be cleaned and it’s ready for collection?”


“Oh yes!” said Molorchos. “A very strange item it was too… But I’m afraid that she gave me strict instructions not to pass it on to you until you’d solved a little puzzle of my own devising and could tell me exactly what that item is...” Hercules sighed. He had been worried about this.


“Right – so where can I find that out?”


Molorchos said nothing straightaway, but merely stabbed the page of horoscopes with his finger and slid it in front of Hercules again.


The stars always have the answers...


TASK: From Molorchos’ page of horoscopes (below), deduce the ‘very strange’ item of clothing Hercules is expected to collect.


enter image description here


Image credits: Zodiac symbols, Torn edges.
Horoscope text available in source for copy-paste purposes.




Answer



The top line gives a hint for what to do:



"Will you listen to their conclusions?" The last word in each line tells you how to extract a message from the rest of it.



The answers to each clue:



Aquarius: "caps": Take the capital letters to get MCC, and E=mc².
Aries: "omnipresent": Take the letter that appears in each word: S.
Cancer: "heart": Take the middle letter of every word to get ROT XIII FBYSRTRYN. Apply rot13 to the second half to get 'SOLFEGE LA'. The note "la" in solfege is A.

Capricorn: "fib": These are the first three letters of "Fibonacci" - take the first three letters of each word in a Fibonacci-sequence position, and then respace to get BAR WITH A 'LESS THAN' OPERATOR. Visually, |< makes a K.
Gemini: "ending": Take the last letters of each word to get SOUTH AFRICAN MONEY. This is the "Rand", written R.
Leo: "seconds": Take the second letters of each word to get BEFORE XENON. The element before xenon on the periodic table is iodine, or I.
Libra: "missing": Take the letter that does not appear anywhere in the horoscope. This letter is J.
Pisces: "repeat": Take the double letters (including across spaces). These spell MORSE DASH, which is T.
Sagittarius: "tips": Take the first letters. These spell ONE HUNDRED IN ROME, which is C.
Scorpio: "afters": Take the letters "after S". These spell INDEFINITE ARTICLE, which is A.
Taurus: "odd": Take every other word, starting with the first. These spell "Take the one that lies in between you and the one shaped like a snake". The letter between U and S is T.
Virgo: "square": Take the words at the positions of square numbers. These spell "A-Team actor Mister [who?]": This is a clue for T.




Rearranging the answers to each clue



by the standard order of the zodiac signs gives the answer: STRAITJACKET.



Understanding Stagnation point in pitot fluid

What is stagnation point in fluid mechanics. At the open end of the pitot tube the velocity of the fluid becomes zero.But that should result...