I'm not an expert here by any means, but can you not relate the ticket number to the date (or time) of the show, thus creating a unique identifier for each show? At it's simplest this could be a show on 19th January ticket number 0001 = 01(january)19(date)0001 = ticket No 01190001. You could change the last four digits to represent a seat number and could include M or E to represent Matinee or Evening. Or have I missed the point??!