New account registration is temporarily disabled.

STATUS

Can someone help me with a math problem?

  • Strak
  • 04/08/2023 12:47 AM

Posts

Pages: 1
So, let's say you have 10 rooms. Each of these rooms has 4 doors. The rooms can be arranged in any order in a straight line, and upon entering the room, 3 of the 4 doors will randomly be locked, and the only way to progress to the next room is to find the one unlocked door. You can only enter each room once.

The question is, how many different ways are there to progress through the 10 rooms? How many ways can the rooms be arranged, and with a randomized exit each time, how many total iterations are there for ways to progress?

I kinda suck with formulae so I'm not sure how to figure this one out.

EDIT: Just figured out that the room configurations alone is 1023 different ways of arranging the rooms. So, with that, now it's just how many ways you can go through different doors in those different configurations. It's definitely more complicated than just multiplying by 4. Is it 1023 ^ 4? That doesn't seem right either.
Room 1 can be any of the 10 remaining rooms: 10 possibilities.
That's 10 possibilities from "Room 0" to Room 1.

Room 1 has 4 doors: 4 possibilities.
Room 2 can be any of the 9 remaining rooms: 9 possibilities.
4 * 9 = 36 possibilities from Room 1 to Room 2.

Room 2 has 4 doors: 4 possibilities.
Room 3 can be any of the 8 remaining rooms: 8 possibilities.
4 * 8 = 32 possibilities from Room 2 to Room 3.

10 + 36 + 32 = 78 possibilities from "Room 0" to Room 3.

Keep going like that and you'll find the answer... I think? I'm terrible at math so I don't know...
That gives me 220 different combinations. Which is... Yeah I think I did my initial math wrong. Even so. That's not bad.

*Insert plug for newest game in development now*

Basically I'm trying to figure out how many different ways you can play through the first dungeon in the game I'm making. It utilities random dungeon generation, which basically constructs a dungeon with 10 rooms out of 30 possible choices, each room having 1 of 4 possible exits. So there's technically way more than 220 permutations, but the idea is that every playthrough will be different, and no run through a dungeon will be the same.

That's just the first dungeon though. Future dungeons will have considerably more than 10 rooms, and considerably more than 30 to choose from. So it should be a decent selection. Hopefully.

Thanks for your help! That actually did answer my question.
pianotm
The TM is for Totally Magical.
32388
Dyhalto
The answer is 42.

42's the answer to everything.
Pages: 1