The main international airport in the Kingdom of Treisaria recently installed automatic currency exchange machines. You can insert banknotes from any of the major world currencies (dollars, euros, yen, pounds, etc.) and receive the equivalent amount in the local currency. The machines' screens display the current exchange rates (with a small processing fee pre-deducted).
Having spent some time in France prior to my trip there, I had a bunch of Euro notes on me, so that's the exchange rate I'm interested in. Currently, one euro buys exactly thirteen Treisarian denari.
The machines are programmed to always return the minimum number of banknotes + coins needed for the amount. For example, when the US version needs to give out $60, it's always as 50 + 10, never three 20's. However, since I wanted more small change, and there was nobody in line behind me to complain about me taking too long at the machine, I fed it my Euro notes one at a time.
- When I put in €5, I receive 1 note and 5 coins.
- When I put in €10, I receive 3 notes and 5 coins.
- When I put in €20, I receive 4 notes and 4 coins.
- When I put in €50, I receive 4 notes and 2 coins.
- When I put in €100, I receive 3 notes and 2 coins.
- When I put in €200, I receive 3 notes and 4 coins.
- When I put in €500, I receive 6 notes and 5 coins.
Treisarian currency has a reputation for being unfriendly to tourists because they don't use the internationally-familiar Arabic numeral system, so people unfamiliar with the local script can't recognize the denominations.
But from the information above, can you work out what the denominations of Treisarian banknotes and coins are? (All are integers, as coins less than 1d have been withdrawn due to inflation. All banknotes are worth more than all coins.)
Hint #1
There are three denominations of coins and four denominations of banknotes.
Hint #2
The country's name is of Semitic origin.
Hint #3
The denominations are such that the greedy algorithm for change-making is optimal for any amount.