Skip to content

A simple function for computing the set number to use for a given sequence number when using a Tower of Hanoi backup scheme

License

Notifications You must be signed in to change notification settings

dvrax/TOHCalculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

TOHCalculator

A simple function for computing the set number to use for a given sequence number when using a Tower of Hanoi backup scheme

Usage is "tohn <seq_num> <num_sets>"

Output will be the 0-based index of the set you should use for backup. For example, if you have 10 sets, and this is the 496th day, you can do "tohn 496 10" and it will tell you to use the set at index 4.

More information about the Tower of Hanoi backup scheme from Wikipedia.

About

A simple function for computing the set number to use for a given sequence number when using a Tower of Hanoi backup scheme

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published