Hello everyone. So (full disclosure) my class's discrete structures teacher gave the class a riddle- find a list that contains a different number of prefixes than suffixes. Unfortunately, nobody is able to think of an example. It seems intuitive that every list of size n contains exactly n prefixes and n suffixes (or n + 1 if we include the empty set), and I cannot think of a single list that this isn't true for. Any ideas?
Much appreciated.
Basic List Question
Re: Basic List Question
I suppose you have the answer by now.
I suspect that it depends on some nuance of the definition of "list" you're using in that class. Your analysis sounds correct to me, FWIW.
I suspect that it depends on some nuance of the definition of "list" you're using in that class. Your analysis sounds correct to me, FWIW.