Icosahedron

I’ve been staring at my icosahedron, trying to solve the following puzzle by Konstantin Knop.

Puzzle. One face of an icosahedron is special. The numbers 2, 3, and 5 are written at its vertices in some order. All other vertices of the icosahedron are labeled with 1. In one query, we may ask an oracle for the product of the numbers assigned to any subset of icosahedron’s vertices. What is the minimum number of queries needed to determine the special face?

However, I misread the problem. I ended up solving a different puzzle instead—and had quite a bit of fun doing it.

Puzzle. One face of an icosahedron is special. The numbers 2, 3, and 5 are written at its vertices in some order. All other vertices of the icosahedron are labeled with 1. In one query, we may ask an oracle for the product of the numbers assigned to vertices of any one face of the icosahedron. What is the minimum number of queries needed to determine the special face?

I won’t post the solutions just yet, but let me begin with a simple observation: one question cannot possibly be enough. Indeed, with one question, the oracle’s answer must be a divisor of 30, and 30 has only 8 positive divisors. But an icosahedron has 20 faces, so a single question cannot distinguish among all possible choices for the special face.


Share:Facebooktwitterredditpinterestlinkedinmail

3 Comments

  1. Sanandan Swaminathan:

    Interesting puzzles. Firstly, at the risk of sounding persnickety, a couple of assumptions. While it’s stated that the 12 numbers are “written” on the vertices, we can assume that only the oracle can see them (otherwise it’s pointless). To make a query, we would point to some set of vertices (in puzzle 1) or to a specific face (in puzzle 2). We can also assume that we are looking for the “maximin” number of queries within which we would be guaranteed to find the special face in every scenario. For example, in puzzle 2, the trivial case of the first face pointed to having product 30 (thus turning out to be the special face) is not the kind of minimum we are looking for. Also, we are only looking to determine which is the special face, not the exact labels on its three vertices.

    Consider a vertex X as the apex vertex. It has edges to vertices A, B, C, D, E. Consider vertices P, Q, R, S, T such that ABP, BCQ, CDR, DES, and EAT are faces. Let the 12th vertex be Y (Y has edges to P, Q, R, S, T).

    Puzzle 1: Any subset of vertices for query1 will contain 0, 1, 2 or all 3 of the special vertices. Two queries would be able to give us 4 x 4 = 16 distinct signatures, but an icosahedron has 20 faces. While it is true that the first answer gives us more information than just the number of special vertices in the subset (the answer gives us a specific product), I don’t see how that helps keep the total number of queries down to two. For example, if answer1 was 2, we have found that our subset included only one special vertex and its label is 2. But there’s no reason to change our subset for query2 from the subset we would use if answer1 was 3 or 5. So, I think three queries will be needed to cover all scenarios. There are 20 faces. Query1 should be such that it narrows the search down to just 5 faces. For example, the subset for query1 could be {X, A, B, C, D, E}. If the answer is 30, we know that the special face is XAB, XBC, XCD, XDE, or XEA. The subset for query2 could be {A, B, C, D}. The answer can be either a single prime or the product of two primes. If it’s a single prime, it’s assigned to vertex A or D, and the special face is XDE or XEA. A third query like {D, E} can determine whether XDE or XEA is special. If the answer to query2 is the product of two primes, then the special face is XAB, XBC, or XCD. Query3 can be {A, B}. If the answer is the product of two primes, then the special face is XAB. If it’s a single prime, then the special face is XBC. If it’s 1, then the special face is XCD.

    Similarly, if the answer to query1 was a product of two primes, then the special face is ABP, BCQ, CDR, DES, or EAT. We can use similar queries as shown above to determine the special face with two further queries.

    If the answer to query1 was a single prime, then the special face is PQB, QRC, RSD, STE, or TPA. Again, we can use similar queries as shown above to determine the special face with two further queries.

    If the answer to query1 was 1, then the special face is YPQ, YQR, YRS, YST, or YTP. This is the same configuration as X, A, B, C, D, E above. The special face can be determined with a further two queries.

    Thus, three queries to cover all scenarios.

  2. Sanandan Swaminathan:

    Puzzle 2: Same assumptions and labeling of icosahedron vertices (X, A, B, C, D…) as in my previous write-up (for puzzle 1). In this puzzle also, it looks like we will need a maximin of 3 queries to guarantee finding the special face. Actually, in my solution attempt for puzzle 1 (sent before), I use exactly three queries in all scenarios, but here 3 queries is a maximin. In this puzzle, we would point to a face and the oracle would tell us the product of the three vertices on that face. WLOG, let us say we point to face XAB for query1. If the answer is 1, it immediately rules out 10 faces. But it leaves us with 10 candidate faces. The special face cannot be found with one additional query. Thus, I think we need a total of 3 queries in the worst case. Here is one approach to achieve the goal with at most 3 total queries.

    Query1: Ask for the product of face XAB. If the oracle says 30, then XAB is the special face, and we are done.

    Now consider the case where answer1 is the product of two numbers from 2, 3, 5. WLOG, say the number is 15 (3 x 5). Then we know that the special face is ABP or XBC or XAE. In query2, ask for the product of face BPQ. If it’s the product of two numbers (would be 6 or 10 if the first query’s answer was 15), then ABP is the special face. If the answer is a single prime (would be 3 or 5 if the first query’s answer was 15), then XBC is the special face. If the answer is 1, then XAE is the special face. So, a total of 2 queries suffice in this scenario.

    Now consider that answer1 is a single prime. Then the special face could be XCD, XDE, AET, ATP, BPQ or BCQ. In query2, ask for the product of face ABP. If the product is 1, then the special face is XCD or XDE which can be resolved with query3. If query2’s answer is a single prime (would be the same prime as answer1), then the special face is AET or BCQ which can be resolved with query3. If query2’s answer is product of two primes (would be the prime of answer1 multiplied by another prime), then the special face is ATP or BPQ which can be resolved with query3.

    Now consider that the answer to query1 was 1. Then the special face is among the ten faces YPQ, YQR, YRS, YST, YTP, QRC, CDR, RSD, DES, or EST. In query2, ask for the product of face CDR. If the answer is 30, then CDR is the special face. If the answer is the product of two primes, then the special face is RSD or QRC which can be resolved with query3. If answer2 was a single prime, then the special face is DES, YRS or YQR. In query3, ask for the product of face YRS. If the product is 30, YRS is the special face. If the answer is the product of two primes, then the special face is YQR. Otherwise, answer3 will be a single prime, and the special face is DES. If answer2 was 1, then the special face is EST, YST, YTP, or YPQ. In query3, ask for the product of face EST. If the product is 30, then EST is the special face. If the answer is the product of two primes, then YST is the special face. If the answer is a single prime, then YTP is the special face. If the answer is 1, then YPQ is the special face.

    Thus, at most three queries to cover all scenarios in puzzle 2.

  3. Sanandan Swaminathan:

    Looks like my previous post errored out. After submitting my solution (with 3 queries) for puzzle 1, it has been bothering me that the solution doesn’t use the products strongly enough. I wrote a program to check if there is any way two queries would suffice. And it turns out that two queries are indeed sufficient!

    Label the vertices 0 through 11. The twenty faces are (0, 1, 2), (0, 2, 3), (0, 3, 4), (0, 4, 5), (0, 5, 1), (1, 2, 6), (2, 3, 7), (3, 4, 8), (4, 5, 9), (5, 1, 10), (1, 6, 10), (2, 7, 6), (3, 8, 7), (4, 9, 8), (5, 10, 9), (11, 6, 7), (11, 7, 8), (11, 8, 9), (11, 9, 10), (11, 10, 6).

    For query1, use the subset of vertices 0, 1, 2, 3, 4, 6. Let’s call the product (the answer for query1) as product1. Product1 can be 1, 2, 3, 5, 6, 10, 15 or 30. Based on product1, use the appropriate subset below for query2.
    If product1 is 1 , use subset 9, 10, 5 for query2.
    If product1 is 2 or 3 or 5 , use subset 1, 4, 7, 8, 9 for query2.
    If product1 is 6 or 10 or 15, use subset 2, 3, 4, 5, 8 for query2.
    If product1 is 30 , use subset 0, 3, 4 for query2.

    Let’s call the product (answer of query2) as product2. The pair (product1, product2) uniquely identifies a face as the special face. Several faces actually map to multiple product pairs (for different permutations of 2, 3, 5 on the three vertices). But more importantly, no two different faces map to the same product pair. I have the output that shows all the mappings. It’s quite verbose, so I’ll try to post it later.

    I wrote a program to find this two-query solution. There are 2**12 – 2 = 4094 subsets of the 12 vertices (excluding the empty set and the full set). Each subset is a candidate for query1. There are 20 faces and 6 permutations of 2, 3, 5. For each subset of vertices, the program looks at each face-permutation pair as a special face. It creates 8 buckets for the 8 possible products from query1. It places each face-permutation into a bucket. It then iterates through the vertex subsets again for each bucket. The idea is to determine a subset (for every product1) that results in every different face in that bucket ending up with a distinct product1, product2 signature. It’s fine for two different permutations on the same face to end up with the same product1, product2 pair. Query1 and Query2 as given above ensure that all 20 faces end up with different product1, product2 pair signature. The numbers are not very large, so I didn’t bother with symmetries etc. The program completed instantaneously.

Leave a comment