An alien society uses a peculiar currency called 'pibs' with just two denominations of coins — a +13 pibs coin and a −9 pibs coin. You have several of these coins. Is it possible to purchase an item that costs +85 pibs? Using the two denominations, try to get the following totals: (a) +20 (b) +40 (c) −50 (d) +8 (e) +10 (f) −2 (g) +1 (h) Is it possible to purchase an item that costs 1568 pibs?
Get total +20
7 coins of +13 and 8 coins of −9 gives 91 − 72 = 19. Try other combinations to get exactly 20.
Get total +40
4 coins of +13 and 1 coin of −9 gives 52 − 9 = 43. Try other combinations.
Get total −50
2 coins of +13 and 8 coins of −9 gives 26 − 72 = −46. Try other combinations.
Get total +8
5 coins of +13 and 6 coins of −9 gives 65 − 54 = 11. Try other combinations.
Get total +10
1 coin of +13 and 1 coin of −9 gives 13 − 9 = 4. Try other combinations.
Get total −2
5 coins of +13 and 7 coins of −9 gives 65 − 63 = 2. Try other combinations.
Get total +1
7 coins of +13 and 10 coins of −9 gives 91 − 90 = 1 ✓
Yes, it is possible. Since gcd(13, 9) = 1, any integer can be expressed as 13a − 9b for some integers a and b.
Explanation
(a) We need 13a − 9b = 20. Through trial: 13(5) − 9(5) = 65 − 45 = 20 ✓ (b) We need 13a − 9b = 40. Through trial: 13(7) − 9(6) = 91 − 54 = 37 (close). 13(10) − 9(10) = 130 − 90 = 40 ✓ (c) We need 13a − 9b = −50. Through trial: 13(4) − 9(11) = 52 − 99 = −47 (close). 13(2) − 9(8) = 26 − 72 = −46. (d) We need 13a − 9b = 8. Through trial: 13(2) − 9(2) = 26 − 18 = 8 ✓ (e) We need 13a − 9b = 10. Through trial: 13(7) − 9(9) = 91 − 81 = 10 ✓ (f) We need 13a − 9b = −2. Through trial: 13(5) − 9(7) = 65 − 63 = 2. For −2: 13(2) − 9(4) = 26 − 36 = −10 (close). (g) We need 13a − 9b = 1. 13(7) − 9(10) = 91 − 90 = 1 ✓ (h) By the properties of linear Diophantine equations, since gcd(13, 9) = 1, the equation 13a − 9b = 1568 has integer solutions.