how can you turn the "path" into a 4 digit number? that makes no sense. you maybe could generate a checksum on each path, but checksums are more than 4 digits long. unless you use a large base. like base 1000 instead of base 10, but then you'd have to invent a bunch of characters.