======Project====== PRACTICING CRITICAL THINKING (pctX) =====Note===== This is a generic project page that may be used for many different pct# projects, as a result, you will see mention of 'pctX' throughout this document. Substitute the project number in place of the X when it comes to file-naming and project submission. For example, if you are working on pct1, when you see an a project reference of "pctX", instead use "pct1". I've made some alterations to administration/evaluation/performance of the puzzles for whatever credit there is to be earned. Those changes are: * your solution must be NO fewer than puzzle base number of lines (ie if the puzzle base is 10, your solution can NOT be shorter than 10 lines) * your solution must routinely show your progress, the WHY and HOW of your process, that leads you from start to completion * I will no longer confirm puzzle keys: giving them out deprives you of cultivating necessary debugging skills to ascertain that on your own * I will no longer work through your current given puzzle when you require assistance. I am more than happy to work through a DIFFERENT puzzle. Pertaining to bonus/for-credit puzzles (pct1-pctC): * all odd-numbered pctX projects will be bonus * all even-numbered pctX puzzles will be for credit =====Objective===== To cultivate your problem solving, critical thinking, analytical, and observation skills. The aim here is on observation, analysis, and documentation. You are solving and documenting a problem by hand, thinking your way through to solution, NOT copying something, NOR writing any sort of program. =====Background===== The true nature of problem solving frequently involves critical thinking, analytical, and observation skills. Where problems are not solved by memorizing some pre-defined set of answers and regurgitating them mindlessly, but in crafting an elaborate solution from subtle cues and tested, experimental realizations. This project puts you in contact with such endeavours. The better acquainted you become with these skills, the more adept you will become at a wide-array of tasks and activities. ====Investigation/Logic Methods==== These problems will make use of investigative and logical processes to allow us to experiment and ascertain the identity of the various letters. This is often done through: * observation * seeing patterns * analysis * investigation * *duction: https://en.wikipedia.org/wiki/Abductive_reasoning * induction: https://www.analyzemath.com/math_induction/mathematical_induction.html * deduction: http://mathcentral.uregina.ca/QQ/database/QQ.09.99/pax1.html ====Math Preparation==== If you find yourself struggling with the concepts of the underlying math: * https://www.ipracticemath.com/learn/basicmath * https://www.mathsisfun.com/long_division.html The pctX problems are just your standard “long division with remainder” style problems, only given to you worked out, with the numbers replaced with letters, so instead of going at it beginning to end, we investigate it end to start. ====Long Division==== Letter division is a category of logic problem where you would take an ordinary math equation (in long form), and substitute all the numbers for letters, thereby in a direct sense masking the numeric values present that correctly enable the problem to work from start to completion. It is your task, through exploring, experimenting, and playing, to ascertain the numeric value of each letter (as many as 10, one for each numeric value 0-9). We will be focusing on long division, something you learned (and perhaps last experienced, before becoming mindlessly addicted to pressing buttons on a calculator), in grade school. It entails a whole number (integer) division, involving aspects addition (through borrowing), and subtraction (primarily) to arrive at a quotient and a remainder, and if applicable: multiplication. There is also a logical/relational aspect to these puzzles, which may well be less familiar territory to some. But so incredibly important when exploring a process and communicating such notions to the computer. Division is unique in that it produces two 'answers', each serving particular uses in various applications. Here is an example (using numbers): First up, we're going to divide 87654321 (the dividend) by 1224 (the divisor). Commonly, especially if punching into a calculator, we might express that equation as: 87654321/1224 Or in a language like C, assigning the quotient to the variable **x** (an **int**eger): x = 87654321 / 1224; But, we're not specifically interested in the 'answer' (quotient or remainder); we are interested in the PROCESS. You know, the stuff the calculator does for you, which in order to perform this project and better explore the aspects of critical thinking, we need to take and encounter every step of the way: 71613 +--------- 1224 | 87654321 -8568 ==== 1974 -1224 ==== 7503 -7344 ==== 1592 -1224 ==== 3681 -3672 ==== 9 Here we obtain the results (focusing on the quotient up top; as the remainder quite literally is what remains once we're done- we're specifically NOT delving into decimal points, but instead doing integer division, which as previously stated has MANY important applications in computing) through a step by step process of seeing how many times our divisor (1224) best and in the smallest fashion fits into some current value of the dividend (or intermediate result thereof). For instance, seeking the smallest "best fit" of 1224 into 87654321, we find that 1224 fits best SEVEN times (1224 * 7 = 8568, which is the CLOSEST we can get to 8765... 1224 * 8 = 9792, which would be too big (and way too small for 87654). Clearly, we are seeking those values that best fit within a multiple of 0-9, staying away from double digits of multiplication (although, we COULD do it that way and still arrive at the same end result). So: 8765-8568 = 197. We have our first result, yet: there's still values in the dividend (87654321) remaining to process, specifically the 4321, so we take them one digit at a time. The next available, unprocessed digit in 4321 is '4', so we 'drop that down' and append it to our previous result (197), giving us: 1974. We now see how many times (via single digit multiplication), our divisor (1224) can fit into 1974. As it turns out, just once. So: 1974-1224 = 750. And we keep repeating the process until there are no more digits from the dividend to drop down; at which point, we are left with a remainder (in the above problem, the lone '9' at the very bottom; THAT is the remainder). Clearly it is important to have a handle on and understanding of the basic long division process before attempting a letter division problem. So, be sure to try your hand at a few practice problems before proceeding. ====Letter Division: an example==== Following will be a sample letter division problem, and a documented solution of it, much as you will be doing for this project (and to be sure: the aim here is not merely to solve it, but to DOCUMENT HOW YOU SOLVED IT. You might want to keep notes as you go along to save you time and sanity). Here goes: GLJK +--------- KJKK | GLMBRVLR -VKOKL ===== LJBGV -OKVKG ===== JJGKL -LKBKV ===== KVRMR -JKRKB ===== VKMK letters: BGJKLMOPRV First off, note how this is NO DIFFERENT from the numeric problem above: just instead of numbers, which we've associated some concepts with, here we have letters (each letter maps to a unique number, 0-9). The trick will be to figure out which letter maps to which number. So, let us begin. One aim is to obtain the key to the puzzle, the mapping of the letters to numbers, so I will typically set up an answer key as follows: | 0 | | | 1 | | | 2 | | | 3 | | | 4 | | | 5 | | | 6 | | | 7 | | | 8 | | | 9 | | Another thing I like to do is set up a more visual representation of what each letter COULD be. I do so in the following form: B = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } G = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } J = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } K = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } L = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } M = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } O = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } P = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } R = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } V = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } Then, as I figure things out (either what certain are, but mostly, which ones they are NOT), I can mark it up accordingly. Right from the start, we can already make some important connections; looking at EACH of the subtractions taking place, in the left-most position, we see an interesting phenomenon taking place- G-V=0, L-O=0, J-L=0, and K-J=0. Now, since EACH letter is its own unique numeric value, subtracting one letter from another on its own won't result in a value of 0, but being borrowed from will. That is: 7-6=1, but (7-1)-6=0. THAT is what is going on here. So what we can infer from this, is some very important connections: * V is one less than G (I'll write it as: V < G) * O is one less than L (O < L) * L is one less than J (L < J) * J is one less than K (J < K) Does that make sense? From looking at the puzzle, those four relations can be made. Now, FURTHERMORE, some of those connections are thereby connected. Look at the 'L' and 'J' connections: * O < L, but also: L < J * L < J, but also: J < K That implies a further connection, so we can chain them together: * O < L < J < K So from that initial observation and connection, we now have two disconnected relationships: * V < G * O < L < J < K From what we've done so far, we do not know where V,G fall in respect to O,L,J,K. They might be less than, OR greater than. We won't know without further information. Yet, even WITH this information, we can update our letter ranges: * since V is less than G, we know V can NOT be 9. * similarly, G can NOT be 0. * O cannot be 9, 8, 7, because we know O is 3 less than K. So even though we don't know what K actually is, because K COULD be 9, we know what O, L, and J can NOT be. * L cannot be 9 or 8 * J cannot be 9 * on the other side, K cannot be 0, 1, or 2 * J cannot be 0 or 1 * L cannot be 0. So, if we update our range chart accordingly: B = { 0, 1, 2, 3, 4, 5, 6, 7, 8 } G = { 1, 2, 3, 4, 5, 6, 7, 8, 9 } J = { 2, 3, 4, 5, 6, 7, 8, } K = { 3, 4, 5, 6, 7, 8, 9 } L = { 1, 2, 3, 4, 5, 6, 7, } M = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } O = { 0, 1, 2, 3, 4, 5, 6, } P = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } R = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } V = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } Moving on, dealing with details of discovering those one-off relations, that tells us something about the NEXT subtractions: that they borrow (which means they are LESS THAN the thing being subtracted from them): * L is less than K (which we actually know to be 2 less than K), so L - K needs to BORROW * J is less than K (which we know is 1 less than K), so J - K needs to BORROW * V is apparently also less than K (which we didn't previously know), so V - K needs to BORROW * now knowing than V << K, we can connect our other relational fragment in (I use the double '<<' to denote "less than" by an unknown amount, because while we know V is less than K, we don't know by how much). So: V < G << O < L < J < K This allows us some further whittling of our ranges: * V cannot be 9, 8, 7, 6, or 5 * G cannot be 9, 8, 7, or 6 * O cannot be 0, or 1 * L cannot be 0, 1, or 2 * J cannot be 0, 1, 2, or 3 * K cannot be 0, 1, 2, 3, or 4 B = { 0, 1, 2, 3, 4, 5, 6, 7, 8 } G = { 1, 2, 3, 4, 5, } J = { 4, 5, 6, 7, 8, } K = { 5, 6, 7, 8, 9 } L = { 3, 4, 5, 6, 7, } M = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } O = { 2, 3, 4, 5, 6, } P = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } R = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } V = { 0, 1, 2, 3, 4, } Already we can see that V and G are likely lower numbers, and O, L, J, and K are likely higher numbers. What else do we have? Let's keep going: We cannot instantly proceed to the next subtraction in as obvious a progression, as we'll need more information on the various letters involved. ===Finding K (and J and L and O as well)=== However, looking at the puzzle, I'm interested in seeing if we can find any obvious examples of 0. You know, letter minus same letter sort of things. Because they will typically end up equalling 0 (or 9). Why 9? Because of a borrow! ((5-1)+10)-5 = (4+10)-5 = 14 - 5 = 9 ... that can be quite revealing too! And it would appear we have one wonderful candidate in the bottom-most subtraction: KVRMR -JKRKB ===== VKMK Lookie there: R-R = K. Usually, that would result in a 0. BUT, we also know that K can NOT be 0 (looking at our range table above). So, that means it is being borrowed from, and it itself has to borrow, so we now also know that M is less than K (M << K). And, as indicated above: ((R-1)+10)-R = 9! We now know that K = 9! That suddenly reveals a whole lot to us, due to our relational chains we've built. Let's update: | 0 | | | 1 | | | 2 | | | 3 | | | 4 | | | 5 | | | 6 | O | | 7 | L | | 8 | J | | 9 | K | Also, with the new introduction of M being less than K: B = { 0, 1, 2, 3, 4, 5, } G = { 1, 2, 3, 4, 5, } J = { 8 } K = { 9 } L = { 7 } M = { 0, 1, 2, 3, 4, 5, } O = { 6 } P = { 0, 1, 2, 3, 4, 5, } R = { 0, 1, 2, 3, 4, 5, } V = { 0, 1, 2, 3, 4, } And, our relational chains: * V < G << O < L < J < K * M << O < L < J < K Because we don't yet know any relation of M compared to V or G, we have to keep them separate for now. We also have a second disqualifier for K being 0... the ones place subtraction in that bottom-most subtraction: R - B = K. There's nothing further to the right that could borrow from this problem, so it can only exist in two states: * R is greater than B * R is less than B Since we know that K is 9, there's NO OTHER pair of single digit numbers we can subtract to get 9, which tells us that: * R is less than B (R << B) Currently both R and B can be 0-5 (although now, B is 1-5, and R is 0-4). We'd need to find a combination where (R+10)-B is 9: ^ R: 0 ^ R: 1 ^ R: 2 ^ R: 3 ^ R: 4 | | (0+10) | (1+10) | (2+10) | (3+10) | (4+10) | | 10 | 11 | 12 | 13 | 14 | And from that, we're subtracting B, which is 1, 2, 3, 4, or 5. The answer has to be 9. So: 10-1=9, 11-2=9, 12-3=9, 13-4=9, and 14-5=9 Hey, look at that... B is one greater than R (not just R << B, BUT: R < B) Our relational chains: * V < G << O < L < J < K * M << O < L < J < K * R < B << O < L < J < K And our chart, of sorts: B = { 1, 2, 3, 4, 5, } G = { 1, 2, 3, 4, 5, } J = { 8 } K = { 9 } L = { 7 } M = { 0, 1, 2, 3, 4, 5, } O = { 6 } P = { 0, 1, 2, 3, 4, 5, } R = { 0, 1, 2, 3, 4, } V = { 0, 1, 2, 3, 4, } If you look, the only letter we've not yet directly interacted with yet is 'P', although we already know enough about it (that it is 0-5, less than O, L, J, and K). And if you look closely, you'll notice that 'P' isn't even present in the letter division problem! So its identity will rely entirely on the proving of the other values. Let's continue on: M-K=M, BECAUSE we know M << K, AND BECAUSE we know the subtraction to the right is borrowing from it (because R < B), we have something like this: (M-1+10)-K=M Can't really do much more with it at this point, but it is important to know to help us identify the borrows needing to happen. ===Finding our zero value (R and B)=== Why don't we go ahead and find 0? If you look in the subtraction above the bottom one, we have another "letter minus same letter" scenario, and it doesn't equal K! JJGKL -LKBKV ===== KVRM We KNOW that V << L, so no borrow is happening there. Therefore, K-K, or 9-9, equals 0. So R is 0! ... and B is 1! Because of our identified relationship. Updating things! | 0 | R | | 1 | B | | 2 | | | 3 | | | 4 | | | 5 | | | 6 | O | | 7 | L | | 8 | J | | 9 | K | Also, with the new introduction of M being less than K: B = { 1 } G = { 3, 4, 5, } J = { 8 } K = { 9 } L = { 7 } M = { 2, 3, 4, 5, } O = { 6 } P = { 2, 3, 4, 5, } R = { 0 } V = { 2, 3, 4, } *NOTE: G is NOT 2, because G is greater than V (one greater, in fact), so we can similarly whittle that off. Relational chains can look as follows now: * R < B << V < G << O < L < J < K * R < B << M << O < L < J < K * R < B << P << O < L < J < K Basically just down to V, G, P, and M. ===Finding V and G=== And I think we have the means to find V: notice the second to last subtraction, the "LKBKV". You know where we get that from? Multiplying the divisor (KJKK) by J (since it is the third subtraction taking place). We KNOW the numeric values of K and J, in fact we know the values of L, K, and B. The only thing we don't know is 'V', and since V is in the one's place, that makes things super easy for us. KJKK = 9899 J = 8 So: 9899 x 8 = 79192 = LKBKV! V is 2! Which means, because V < G, that G is 3! Updating our records: | 0 | R | | 1 | B | | 2 | V | | 3 | G | | 4 | | | 5 | | | 6 | O | | 7 | L | | 8 | J | | 9 | K | Also, with the new introduction of M being less than K: B = { 1 } G = { 3 } J = { 8 } K = { 9 } L = { 7 } M = { 4, 5, } O = { 6 } P = { 4, 5, } R = { 0 } V = { 2 } Relational chains can look as follows now: * R < B < V < G << M << O < L < J < K * R < B < V < G << P << O < L < J < K ===Finding M and discovering P=== And then there were 2. We really just need to find M, or P, and we're done. And since there are no 'P' values in the puzzle, we need to target M. So let's look for some candidates: Hey, how about this: JJGKL -LKBKV ===== KVRM One's place subtraction: L - V = M. We KNOW L (7) is greater than V (2), so no borrow is happening. L-V=M 7-2=5 M is 5. That means P is 4 by process of elimination. Puzzle completed: | 0 | R | | 1 | B | | 2 | V | | 3 | G | | 4 | P | | 5 | M | | 6 | O | | 7 | L | | 8 | J | | 9 | K | Also, with the new introduction of M being less than K: B = { 1 } G = { 3 } J = { 8 } K = { 9 } L = { 7 } M = { 5 } O = { 6 } P = { 4 } R = { 0 } V = { 2 } Relational chains can look as follows now: * R < B < V < G < P < M < O < L < J < K I wasn't able to show it as well in text on the wiki, but I also made a point to mark up each subtraction to show whether a borrow occurred or not: {{ :undefined:borrows.jpg?400 |}} To be sure, there are likely MANY, MANY ways to arrive at these conclusions. What is important is being observant, performing little experiments, seeing if there can be any insights to have, even if whittling away knowing what things can NOT be. Your performance on this project will be directly tied to being able to document your process through the puzzle; I have provided this writeup in order to show you an example of what that process may look like. =====Getting started===== In the **pctX/** sub-directory of your class Public Directory, under a directory by the name of your username, you will find the following file(s): * **puzzle** * possibly also a file called **table** Copy this file into your local project directory. For some classes, a **grabit** is available. For others, you'll have to manually copy the file on your own. There is also a **MANIFEST** file in the parent directory (the **pctX/** sub-directory), which will contain MD5sums of the various puzzle keys, provided to help you in verifying your puzzle key. For this project, you have to solve, DOCUMENT, AND VERIFY the provided puzzle in order to be eligible for full credit will be the one contained in the **puzzle** file. To obtain your puzzle, you can utilize the 'grabit' tool on lab46. Here's another take on how to get started: * [[/haas/spring2023/common/helpances/startingpctx|a helpance on starting pctX]] =====Process===== Solve, document, and verify the puzzle. On your own. Seek to discover and explore and understand, NOT to just come up with an answer. It is recommended you do this by hand, ON PAPER. Furthermore, using graph paper may help in greatly reducing mistakes, as is using two different coloured writing implements (green, purple; or blue, black)... write up the puzzle in one colour, then use the other to mark up borrows and the like. =====A Note on Number Bases===== Some of the puzzles you may be presented with may be in different number bases. You are likely acclimated to the **base 10** number system, where we have ten unique counting digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) Different number bases simply have less or more digits. For example, base 8 and 9 both have fewer than ten counting values: ^ base ^ numbers | | 8 | 0, 1, 2, 3, 4, 5, 6, 7 | | 9 | 0, 1, 2, 3, 4, 5, 6, 7, 8 | And then we have bases with MORE counting values than in base 10: ^ base ^ numbers | | 11 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A | | 12 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B | Notice the presence of 'A' and 'B'... these are not variables or algebraic values. These are bonafide **NUMBERS**, just like 1, 2, 3. Differences manifest once you exceed the maximum counting value for the base: * base 8: 7 + 1 = 10 (pronounced "one-zero", the quantity we know of in base 10 as "eight") * base 9: 8 + 1 = 10 (pronounced "one-zero", the quantity we know of in base 10 as "nine") * base 10: 9 + 1 = 10 (pronounced "one-zero", the quantity we know of in base 10 as "ten") * base 11: A + 1 = 10 (pronounced "one-zero", the quantity we know of in base 10 as "eleven") * base 12: B + 1 = 10 (pronounced "one-zero", the quantity we know of in base 10 as "twelve") You likely have extensively memorized a table of single-digit base 10 values, which at first glance makes this other base stuff unfamiliar. But it works according to the same properties as base 10 (just, different symbols representing the quantities involved). For any strategies involving the "9" value (in base 10), you will find that the same strategy works in other bases (so it isn't so much a "9 trick" as it is a "highest counting digit trick"). Similarly, any of the relational or logical tricks will "just work", it is only the appearance of mathematical end results that really differs. So, if you are adept at the logical/relational methods for investigating a puzzle, you could perhaps minimize the amount of base-related math you may have to do (certainly on lower difficulty levels of puzzle). =====Your Submission===== As this project focuses more on the critical thinking process than being specifically about coming up with an answer, your submission will be in multiple parts. ====Regular/normal letter division==== If your puzzle was provided with a quotient and remainder (and contains no question marks in the puzzle proper), you have a regular puzzle. The files you will want to submit include: * your puzzle key, in a textfile called 'pctX.puzzle.key' containing ONLY the capital letters corresponding in order to the 0-9 values (and a trailing newline). * your documentation of your solving and exploration of the puzzle. If you did this on paper, will need to transcribe it out into clearly readable, organized, and followable text directions. The file, in text form, should be called 'pctX.puzzle.solution'. Images of your notes will NOT be accepted for submission. * your verification in a file called 'pctX.puzzle.verify': this is after you've completed the puzzle, and you are resolving parts of the puzzle to ensure that the letter to number mappings are valid. Your solution MUST be of a form so that, if given to another person, they can follow your steps and have an understanding of the decisions made. ===="Solve for" Quotient/Remainder letter division==== * your puzzle key, in a textfile called 'pctX.puzzle.key' containing ONLY the capital letters corresponding in order to the 0-9 values (and a trailing newline). * your documentation of your solving and exploration of the puzzle. If you did this on paper, will need to transcribe it out into clearly readable, organized, and followable text directions. The file, in text form, should be called 'pctX.puzzle.solution'. Images of your notes will NOT be accepted for submission. * your quotient:remainder (in letterized/obfuscated form), in a text file called 'pctX.puzzle.verify' Your solution MUST be of a form so that, if given to another person, they can follow your steps and have an understanding of the decisions made to get them from start to solution. ====puzzle key==== As indicated, you are to place the determined key to your puzzle in a regular text file called 'pctX.puzzle.key', and will contain ONLY the capital letters, in order from 0 to the highest counting symbol of the base, of your puzzle (and a trailing newline). For example, using the example puzzle above: | 0 | R | | 1 | B | | 2 | V | | 3 | G | | 4 | P | | 5 | M | | 6 | O | | 7 | L | | 8 | J | | 9 | K | We'll want to put them, in order, in our key file: $ echo "RBVGPMOLJK" > pctX.puzzle.key Want to know what a proper 'key' file should look like? This: $ cat pctX.puzzle.key RBVGPMOLJK JUST the letters (and a trailing newline). ====solution documentation==== As stated, a very large part of this project's evaluation will be based on your clear and detailed documentation of how you determined each letter's mapping in the solution key of your puzzle. Just providing the 'key' will not result in success. Your documentation should, while there may be supporting information, provide some identified path that showed the steps you went through to identify each letter, be it directly or indirectly. You are free to write out your solution with pen on paper (that is how I usually do these puzzles); but to submit, you MUST transcribe it to text and submit it in that format. Images will NOT be accepted. Do not look on this as a reason to avoid doing it by hand: the manual work of the process is inherently beneficial, you simply need to commit to doing it. The aim here is not to dump a bunch of data on me, but instead present me with connected and pertinent information that documents your process of progression through the puzzle from start to finish. This is in the same vein as programming in a language on a computer. A computer program is a detailed description of a process to solving some problem in a format the receiver can understand. ====verification==== Depending on the type of puzzle you have (regular or "solve for" variety), the contents of your verification file will differ. What is the difference between a regular puzzle and a solve4 puzzle? Basically: * a regular puzzle comes with quotient and remainder included in your puzzle * a solve4 puzzle omits the quotient and remainder, and instead replaces them with a series of question marks, indicating that as part of your task in solving the puzzle, you must also figure out the quotient and remainder (this is why the verify for solve4 puzzles is shorter and simpler: you've already done so much of the verification work in solving it). ===Regular puzzle=== In this form, your 'pctX.puzzle.verify' file will be similar format to your writeup (a description of what aspects of the puzzle you are testing to ensure things work out). You are to manually verify your solution by taking the numeric identities of each letter, plugging them back into the original puzzle, solving it, and converting the obtained quotient and remainder back into letter form to compare with those in the puzzle provided to you. If they match, you have successfully solved the puzzle. If they do not match, some error exists that should be addressed and corrected. An example of a verification text can be found below. ==Regular Puzzle Verification Example== The best way to verify the puzzle with our key is to convert the dividend and divisor to its numeric equivalent, perform the division, and compare the resulting quotient and remainder against those found in the letterified puzzle: * divisor: KJKK --> 9899 * dividend: GLMBRVLR --> 37510270 And let's do some long division! +--------- 9899 | 37510270 9899 goes into 37510 three times: 3 +--------- 9899 | 37510270 -29697 ===== 78132 It might be convenient to have a quick factor reference for 9899 handy: * 9899 * 0 = 0 * 9899 * 1 = 9899 * 9899 * 2 = 19798 * 9899 * 3 = 29697 * 9899 * 4 = 39596 * 9899 * 5 = 49495 * 9899 * 6 = 59394 * 9899 * 7 = 69293 * 9899 * 8 = 79192 * 9899 * 9 = 89091 9899 fits into 78132 seven times (69293): 37 +--------- 9899 | 37510270 -29697 ===== 78132 -69293 ===== 88397 Once again, looking at the list of factors, we see that the best fit for 9899 into 88397 is 79192 (a factor of 8): 378 +--------- 9899 | 37510270 -29697 ===== 78132 -69293 ===== 88397 -79192 ===== 92050 Finally, a factor of 9 (89091) fits in best: 3789 <-- quotient +--------- 9899 | 37510270 -29697 ===== 78132 -69293 ===== 88397 -79192 ===== 92050 -89091 ===== 2959 <-- remainder Converting our quotient and remainder back to letters: * quotient: 3789 --> GLJK * remainder: 2959 --> VKMK And comparing against the problem we were given: * quotient: GLJK <-> GLJK * remainder: VKMK <-> VKMK Success! ==="Solve for"/SOLVE4 puzzle=== The verification for these puzzles becomes a bit easier, as you are merely providing the quotient and remainder. Let's say the quotient was "BTXMK" and the remainder was "YYGMX" You'd prepare your 'pctX.puzzle.verify' file as follows: $ echo "BTXMK:YYGMX" > pctX.puzzle.verify Basically: quotient followed by remainder, separated by a colon, all on the same line. NOTE: Do not include any leading zeroes. =====Walkthrough Videos===== To further aid your letter division efforts, I have recorded some videos showing my walkthrough of various letter division puzzles: * another take on the puzzle presented on this page: https://youtu.be/8oCoGGspf70 * a base 8 letter division puzzle: https://www.youtube.com/watch?v=2Zoa6iymxpw * a base 9 letter division puzzle: https://www.youtube.com/watch?v=zil4YjgC6bw * a base 10 letter division puzzle: https://www.youtube.com/watch?v=b6wv9zXlbJE * a base 11 letter division puzzle: https://youtu.be/OHrLOVihi_4 NOTE: these videos cover just the "regular" letter division puzzles. =====Strategies===== ====Left-Edge==== An advantage of the left-most values, is the top value is greater than those beneath it (it doesn't need to borrow; indeed it CANNOT borrow, without breaking math). Might be taken from, however... This can also help establish the state of borrows elsewhere in the puzzle, should a similar subtraction (same top-value) be present in more than one place. For example: WXXY -PQRT ==== GCBA * W-P=G * P << W (P is somewhat less than W) * G << W (G is somewhat less than W) * NOTE: from this example alone, we do NOT know P's relationship to G. ====Determine Borrows/Takes==== Like the range table and your chains of assertions gradually assembled during puzzle solving, another activity you should undertake is the determination of all the borrows/takes in the puzzle. And not just IF there is a borrow/take, but also if there isn't one. Many may remember the idea of borrows from math class, and are confused at what a "take" is: this is just our attempt to connect one subtraction into the tapestry of the overall problem. Take the following numeric example: 545 -347 === 198 Notice how, looking at the 5-7=8 subtraction (on the far right), we can see that the 5 is somewhat less than 7 (and the 8), so that 5 would have to borrow. Being all the way on the right, nothing is able to take from it, so that 5 is borrowing, but not being taken from. Onto the 4-4=9… because the 5 to its right is needing to borrow… what is it borrowing from? The 4. So our 4 is being "taken from". * 4-1=3 3 is less than 4 (And 9), so THAT now has to borrow. So the 4 is being taken from, and as a result, needs to borrow. Then proceeding left to the 5-3=1... being all the way on the left, it can’t borrow from anything, and the universe would explode mathematically if the leftmost, top value in a long division term were less than what was being subtracted from it. So, the 5 does not have to borrow. But we know from the 4-4=9 subtraction, that the 4 borrows, and it is borrowing from the 5 So: that left-most 5 is not borrowing, but it IS being taken from. The state of the borrows/takes greatly enhances our ability to scoop up additional clues we can turn into assertions. ====Top is Known greater than==== When we know the top letter is greater than at least one of the other two numbers in the subtraction, turns out it is also greater than the other: 8 7 6 5 -5 -1 -4 -2 == == == == 3 6 2 3 This can also help establish the state of borrows elsewhere in the puzzle, should a similar subtraction (same top-value and other letter) be present in more than one place. When the top is known to be greater than the or a number beneath, it signifies that NO BORROW is happening. NOTE: this doesn't tell us anything about the TAKE situation. ====Top is Known less than==== When we know the top letter is less than at least one of the other two numbers in the subtraction, turns out it is also less than the other: 13 12 16 11 -5 -3 -7 -4 == == == == 8 9 9 7 This can also help establish the state of borrows elsewhere in the puzzle, should a similar subtraction (same top-value and other letter) be present in more than one place. When the top is known to be less than the or a number beneath, it signifies that a BORROW is happening. NOTE: this doesn't tell us anything about the TAKE situation. ====Right-Edge==== We know from right-most values, that they are NOT being taken from. This can also help establish the state of takes elsewhere in the puzzle, should an identical subtraction be present in more than one place. ====Look for Zero/Greatest digit Candidates==== There are two common give-away cases for finding the two extreme digits (least/lowest/zero and greatest/highest) in a puzzle, regardless of base: X -X = Y and: X -Y = X We don't, simply from this display, know if it is 0 or if it is the greatest digit. Merely that it can only be 0 or the greatest digit. Determining the identity of the letter (Y in these examples) depends on the state of borrow/takings for the subtraction. There really are only TWO possibilities here: * no borrow AND no take (Y would be 0) * borrow AND take (Y would be the greatest digit) The other two scenarios are mathematically impossible given this particular pattern (again, ONLY for 0, greatest digit scenario). ====Process of elimination==== A tactic that sees use in almost any puzzle is that of elimination: or using logic to negate possibilities. For example: ABCD -EFGH ==== JKLM Looking at that right-most subtraction (D-H=M), even if we know NOTHING about D, H, or M, we can, however, ascertain that: * H is NOT zero * M is NOT zero Because none of the zero patterns are manifesting (if we had D-H=D, for instance, in that right-most position, we'd KNOW that H was zero), we can categorically eliminate zero as a possibility for the two lower letters in this subtraction (NOTE: D very well COULD BE zero, but we can't do anything about determining yet solely based on this observation). This strategy would work in other places, too, if sufficient borrows/takes were known. For example, in A-E=J, if we had established that A was NOT being taken from, we could apply this same elimination to E and J (not zero). Or B-F=K, or C-G=L, if we knew we weren't being taken from. But if we don't know the take situation, we cannot yet act on this. ====Doubling==== Sometimes we will be treated to things like: T -P = P Which implies T is double the value of P. This isn't the whole story, as we REALLY need to know the borrow/take situation to do anything with this information. For example, if T is being TAKEN FROM, we know that T is odd. Likewise, if it is NOT being taken from, T is even. Also: * If T does NOT borrow, P+P is some value less than 10. * If T DOES borrow, P+P is some value greater than or equal to 10. In either case of T being odd or even, we can eliminate half the values (if T is even, it cannot be any odd values, not in an even base). ====Next-to hints==== Sometimes you may be treated to left-most clues like this: JKLM -FGHH ==== TWX Notice how J-F equals nothing? That tells us the following things: * F is exactly one value less than J (written: F < J) * K is LESS THAN G and T (K has to borrow to make J-F=0 versus the 1 it would otherwise be). ====Next-to hints, moar==== What really pays off is when we have a scenario like this: JKLJM -FGHFH ===== TWUX See that nestled J-F=U there? Because we had the left-most J-F=NOTHING establishing our assertion that F < J, yet NOT knowing the state of being taken from (ie not knowing anything about M against H or X): * U is EITHER 0 or 1, to be immediately determined once we know the state of M against H or X (the subtraction immediately to the right). ====Subtract by greatest digit, get increment==== If we have identified the greatest value, and we see it elsewhere in the puzzle, NOT as the top value, but as the value being subtracted, or the result, and we are not being taken from, we know some things. For example, let's say C is the greatest digit (9 in base 10), and E << T: PHANT - OMME ===== NACE See the N-M=C ? Because we know C is 9: * N << C (everything not C is less than C (9)) * therefore also: N << M Watch what happens when we plug in values: * N = 1: 11-9=2 * N = 2: 12-9=3 * N = 3: 13-9=4 * N = 4: 14-9=5 * ... through N=7 Notice how when N is 1, M is 2... 2, 3... 3, 4... ? In this scenario: N is EXACTLY ONE LESS than M: N < M. But only when we KNOW what the greatest digit in a base is and know the state of whether or not we are being taken from. ====Subtract by known offset from greatest digit, get offset increment==== Related to the above strategy, on "Subtract by greatest digit, get increment", it actually applies to more than just the greatest digit: so long as you know its distance from the greatest digit, and the take situation of the subtraction, you can derive the offset of increment. A chart of the first few (I typically don't go any further than this out of practicality, although the pattern persists beyond this point of reporting): ^ digit ^ being taken from ^ not being taken from | | greatest | 0 | 1 | | greatest-1 | 1 | 2 | | greatest-2 | 2 | 3 | For example, let's say R is the second greatest digit (A in base 12), and let's say we know that C << R: SECOND - GRADE ====== MATHS See the C-R=A? With R being the known second greatest digit, and knowing that C is somewhat less than R, that means C is borrowing. Looking at the table, depending on the take situation, we can determine that C is exactly 1 or 2 values less than A, potentially offing up nice reduction of possibilities for both C and A. Should it turn out C is being taken from, then C is exactly 1 less than A. If C is not being taken from, then C is exactly 2 less than A. ====Divisor/Multiplication relations==== Since letter divisions are but a long division, if we were to look at one (base 10) as purely numbers: 2565 +--------- 27846 | 71447493 -55692 ===== 157554 -139230 ====== 183249 -167076 ====== 161733 -139230 ====== 22503 Do you see that the divisor (27846) x 2 = 55692, divisor x 5 = 139230, and divisor x 6 = 167076? Pay specific attention to the subtrahend of 55692. Notice how it is exactly the same length in digits as the divisor (5 digits). This allows us to make an important comparison: * divisor (27846) x 1 = the divisor itself (27846). * any similarly-lengthed subtrahend as the divisor is NOT less than the divisor. * so we can make a comparison between the first digits of the divisor and that of the subtrahend. In a fully enlettered puzzle: TECE +--------- TMGNC | MSNNMNXL -EECXT ===== SEMEEN -SLXTLR ====== SGLTNX -SCMRMC ====== SCSMLL -SLXTLR ====== TTERL In the case of TMGNC (the divisor) and EECXT (that first subtrahend), specifically their first letters (T and E), because they are both the same length (5 letters), we can establish the following relation: * T << E (T is somewhat less than E) * by extension, the minuend the subtrahend is being subtracted from, has to be at least the same size or larger than the subtrahend. So, similarly, in TMGNC (the divisor) and MSNNM (5 letters), T << M (T is somewhat less than M. This strategy, making use of multiplication, can only be used on puzzles where multiplication has not been restricted. ====Inverted subtraction pair relations==== Given the following puzzle: SETX +--------- EXEXT | XSSEMLMS -EXEXT ===== LSECEL -TXMXCR ====== SMCXLM -SSXSGN ====== EMMELS -ELCLTG ====== NSTRL base: 10 Have you ever noticed patterns like the following: * M-T=E (1st row, right-most) * E-M=M (2nd row, 3rd from left) or: * X-E=L (1st row, left-most) * E-X=C (1st row, 2nd from right) Basically, two different subtractions that match the following pattern: * top letter in one is a middle/bottom letter in the other * middle/bottom letter in the first is the top in the other ... as is the case in those two identified examples: M (top), E (bottom) and E(top), M (middle/bottom) or: X (top), E (middle) and then E (top), X (middle). When you have scenarios such as this we can assume something about the sum of the OTHER two letters involved: * (E,X) C + L * (E,M) M + T There are actually three possible sums, all dependent upon the state of the takes: ^ no take from either ^ take from one but not the other ^ take from both | | the base | the base - 1 | the base - 2 | So, in the case of M-T=E and E-M=M, because M-T=E is on the right edge, we know it cannot be taken from, so then we only need to determine the take situation for E-M=M. Therefore, there are TWO potential answers for M+T: * (no takes) M + T = 10 * (one take) M + T = 9 ... since the base of the puzzle is 10, 10 is the sum when there are no takes involved on the two subtractions. For other bases, it is still "one zero", but obviously the quantity of that base. The other identified pair in this example; the case of X-E=L and E-X=C, both are within a line, so no immediate clues as to certain states on take/no take. Therefore: * (no takes) C + L = 10 * (one take) C + L = 9 * (two takes) C + L = 8 This tends to be a nice way of accruing additional clues not revealed in more common methods, increasing the chances of increasing letter connectivity and deriving an eventual solution. ====Single-Letter Subtrahend Determination==== NOTE: Mostly useful for the "solve4" category of letter division puzzles providing a conducive scenario to utilize this strategy. Let's look at the following puzzle (base 12): ???????? +--------- PTPXQ | NFNXHNXP -PTPXQ ===== EHFXEN -EQETEF ====== EXTXPX - PTPXQ ====== FNJHUP -FGHJEP ====== ?????? base: 12 With a current range of: E = { 1, } F = { 2, } G = { 4, A, } H = { 8, } J = { 3, } N = { B } P = { 9, } Q = { 7, } R = { 4, A, } T = { 6, } U = { 5, } X = { 0, } As you can see, we are between G and R for the values of 4 and A. The problem here is that R does not appear anywhere in the letter division, meaning we have to determine G to determine R. There exists yet another problem with G, it only appears as the last subtrahend before an unknown remainder; we cannot determine it through natural puzzle-solving means. There are a few ways to go about this: * last subtrahend divided by divisor * finding largest possible value (with factors of divisor) to subtract last minuend by * use the multiplication table and manually carry out the chain of multiplications (propagating carries as generated), building the subtrahend one value at a time (until we reach the letter in question) Going with the first method is simple, although depending on the values known may be impossible or not be as efficient as the second method. We start by turning the divisor and last subtrahend into numbers: * PTPXQ = 96907 * FGHJEP = 2G8319 Since we do not know G yet, we leave it as-is. Now we can substitute G as both 4 and A and try dividing by the divisor to see if we get a whole number or not: * 248319 / 96907 = 3 <- Is clearly correct, therefore G is equal to 4 and R is equal to A. * 2A8319 / 96907 = 3.76424... We are done with the first method. Now let's try the second method, which requires more work and is very similar, but may come in handy when lacking some numbers. First let's start off by turning the divisor and last minuend into numbers: * PTPXQ = 96907 * FNJHUP = 2B3859 Now let's make a factor list for PTPXQ: * 96907 * 1 = 96907 * 96907 * 2 = 171612 * 96907 * 3 = 248319 * 96907 * 4 = 323024 * 96907 * 5 = 3B992B * 96907 * 6 = 494636 * 96907 * 7 = 56B341 * 96907 * 8 = 646048 * 96907 * 9 = 720953 * 96907 * A = 7B765A * 96907 * B = 892365 From this factor list we need to see the highest number we can subtract our last minuend (FNJHUP) by. Clearly 248319 from that group is smaller than FNJUP and is the highest possible number. So that is the last subtrahend used to get the remainder meaning G is equal 4! If G is equal to 4 then R is equal to A. =====Checking your results===== While things like the solution must be qualitatively evaluated, there are a number of simple checks that can be done (especially for your key and verify files) to determine whether or not you are on the right path. On lab46, you can run the **pzlchk** tool in the directory where your puzzle files reside, and it will perform a number of tests, reporting its findings to you in color-coded fashion. To use it: * log into lab46 * change into the directory where your pctX.puzzle files are located (key, solution, verify) * run the **pzlchk** tool with the appropriate arguments: * first argument is your class DESIG * second argument is your pctX project * analyze the results: * green and cyan indicates a level of acceptable status or success * red indicates an error lab46:~/src/SEMESTER/DESIG/pctX$ pzlchk DESIG pctX For example, here's what a fully working, submitted output would look like: lab46:~/src/SEMESTER/DESIG/pctX$ pzlchk DESIG pctX Checking DESIG/pctX data files ... > checking key file ... > key file exists: pctX.puzzle.key > key is of correct format > key is of correct length > key matches an entry in the MANIFEST > checking solution file ... > solution file exists: pctX.puzzle.solution > solution file meets minimum length requirements > checking verify file ... > verify file exists: pctX.puzzle.verify > verify is NOT of incorrect format Checking DESIG/pctX submission ... submitted on 20210202-211205 =====Puzzle Database===== If you find you need more puzzle fun between weekly allocations, you can peruse the entire puzzle database: * https://lab46.g7n.org/~wedge/content/ltrdiv/ =====Submission===== By successfully performing this project, you should be submitting files that satisfy the following requirements: * a 'pctX.puzzle.key' file formatted as indicated elsewhere in this project document * a 'pctX.puzzle.solution' file containing organized and informative detailing of your path to solution * a 'pctX.puzzle.verify' file containing the appropriate verification information NOTE: Please substitute the actual project number in place of the 'X' in pctX. To submit this project to me using the **submit** tool, run the following command at your lab46 prompt: lab46:~/src/SEMESTER/DESIG/pctX$ submit DESIG pctX pctX.puzzle.key pctX.puzzle.solution pctX.puzzle.verify Submitting DESIG project "pctX": -> pctX.puzzle.key(OK) -> pctX.puzzle.solution(OK) -> pctX.puzzle.verify(OK) SUCCESSFULLY SUBMITTED NOTE: "DESIG" here is your class designation. It can be something like "cprog", "unix", "data", "discrete", "c4eng". You should know what your particular class designation is and substitute it into the submit line above. You should get some sort of confirmation indicating successful submission if all went according to plan. If not, check for typos and or locational mismatches. I'll be looking for the following: XX:pctX:final tally of results (XX/XX) *:pctX:puzzle.key file submitted with correct values [#/#] (lower half of one-third) *:pctX:puzzle.solution documents discovery of each letter [#/#] (two-thirds) *:pctX:puzzle.verify provides verification information [#/#] (upper half of one-third) Additional points of consideration: * if any restrictions are in force and they are ignored in the solving of the problem, up to 50% of credit can be deducted. * if solution is messy and disorganized, up to 50% of credit can be deducted (if I cannot easily tell how you got something). Point values for the various iterations of pctX projects: ^ pct0 | 13 pts | bonus | ^ pct1 | 13 pts | bonus | ^ pct2 | 13 pts | | ^ pct3 | 13 pts | bonus | ^ pct4 | 13 pts | | ^ pct5 | 26 pts | bonus | ^ pct6 | 26 pts | | ^ pct7 | 26 pts | bonus | ^ pct8 | 26 pts | | ^ pct9 | 26 pts | bonus | ^ pctA | 39 pts | | ^ pctB | 39 pts | bonus | ^ pctC | 39 pts | | ^ pctD | 39 pts | bonus | ^ pctE | 39 pts | bonus | ^ bwp1 | 26 pts | bonus | ^ bwp2 | 39 pts | bonus |