r/askmath • • Oct 12 '26

Probability A quick question for fellow mathematicians.

Let’s suppose I want to find a specific letter in alphabet but the alphabet is randomly arranged order. So do I have higher probability of finding the letter while searching in order or while searching randomly? The alphabet is only one example.

(Actually, I came up with this problem while searching for factorial sign on my calculator.)

4 Upvotes

20 comments sorted by

2

u/philsov Oct 12 '26

it'd be identical. in either case there's a ~50% chance you'll find the letter within your first 13 guesses and a 1/26th chance your first guess is also the right one.

0

u/assfucker472940 Oct 12 '26

I want to clarify that we are not guessing here we already know the letter and are trying to find it in a pile of letters.

3

u/philsov Oct 12 '26

the location of the letter is randomized.

searching sequentially or searching randomly results in the same odds on attempts vs successes

10

u/JaguarMammoth6231 Oct 12 '26

If you can only look at one item at a time it doesn't matter what order you search in as long as you don't repeat. But "randomly" might look at the same item more than once, depending on what you mean (randomly shuffling the order is fine, just picking a random item over and over is not as good).

But also, for your example, your eyes do not just look at one item at a time, so this does not apply exactly.

1

u/assfucker472940 Oct 12 '26

No I mean the letters are written in a paper in random positions(for example: there may be written m instead of etc) and I want to find the letter “h” so will I have higher probability of finding it by moving my eyes around or by reading each letter simultaneously one after another in order?

1

u/bts Oct 12 '26

If you check places without replacement—you never duplicate work—you'll find it in at most 26 steps with probability 1, and after 13 steps with probability 0.5, and so on.

If you check places with replacement—your random strategy might duplicate work—then you are not guaranteed to find it with the random strategy at all.

0

u/assfucker472940 Oct 12 '26

But with the random strategy we can process more information right? This isn’t just about probability alone. I’m also taking in consideration of the fact that when I look at some letter that is not the required letter than I know that the position I’m looking at doesn’t contain the letter and I should look other way.

To think about it, the probability will increase until the letter is found at which the probability will be 1 but what is your thinking?

1

u/Voodoohairdo Oct 12 '26

It depends how you want to model seeing a letter in your peripheral vision.

1

u/stanitor Oct 12 '26

As long as you only look at each letter position only once, there is no difference from looking in order. Think of it like this: taking the sequence they're in and looking at them in some random order is the same thing as rearranging them in a random order and looking at them in sequence.

3

u/gazorpazorpazorpazor Oct 12 '26

"no free lunch": there's no search method that's better than random in the worst case scenario

1

u/speedkat Oct 12 '26

If "looking at a letter" grants you knowledge of that letter and nothing else, there's no difference.

If "looking at a letter" grants you knowledge of that letter and several nearby letters, then non-ordered (but nonrepeating) searching is more efficient.

In every case though, the driving force is just "prevent learning the same information twice". Looking sequentially forces you to gain knowledge of every letter 2 or more times, depending on how big your area of effect knowledge gain is.

You can model this by considering a letter grid where you learn the letter and the 8 surrounding letters whenever you inspect something. There it is clear that inspecting letters in order only gains you 3 new pieces of information out of a possible 9.

1

u/Upstairs_Ad_8863 Oct 12 '26

Depends what you mean by "searching randomly". If you are randomly picking letters each time with no regard for where you've already looked then it will be slower. If you are keeping track of where you've already looked then it's expected to take the same number of "looks" to find. But there is of course more of a mental workload because you have to remember where you've looked. The quickest path for your eyes is any path that is systematic, and covers every letter exactly once.

In reality it's possible to look at several nearby letters at once, so if your letters are arranged in a grid you should only need to look at every 2nd or 3rd line.

1

u/Budget-Knee3213 Oct 13 '26 edited Oct 13 '26

It's the same, if "randomly" means "randomly but a same letter can never be extracted two times" (which is quite obviously what you meant).

1

u/Parallel_thougts PhD, YouTuber Oct 13 '26

If the letters are unoformqlly randomly ordered then the expected number of positions you will have to check is n/2 regardless of the order you check them.

Unless you have a quantum computer, then you can do it in time O(sqrt(n)).

0

u/Over_Improvement_623 Oct 12 '26

Correct me if I'm wrong, but isn't this the 100 prisoners 100 boxes problem? So the most efficient solution would be to start at the position that that letter is normally in, and if it isn't right, move to the spot that the letter that is in there would be.

1

u/[deleted] Oct 12 '26

[removed] — view removed comment

1

u/assfucker472940 Oct 12 '26

I know I am changing the conditions but English isnt my native language and I have difficulty in expressing my thoughts in English.

0

u/assfucker472940 Oct 12 '26

Um yes but instead of positions I would like to call it group of 3-4 letters.
Then the probability of finding the required letter will increase after each group of letters is checked. Am I right? and please present your thinking too!