+ All Categories
Home > Documents > Generalized Super Mario Bros - Assumption...

Generalized Super Mario Bros - Assumption...

Date post: 13-Aug-2020
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
18
Generalized Super Mario Bros Vorapat Nicklamai 5919369
Transcript
Page 1: Generalized Super Mario Bros - Assumption Universityportal.scitech.au.edu/.../2017/07/Mario-Vorapat.pdf · generalized Super Mario Bros.” MARIO 000000 NOR LD x oo T IME sun«n rms.

Generalized Super Mario BrosVorapat Nicklamai 5919369

Page 2: Generalized Super Mario Bros - Assumption Universityportal.scitech.au.edu/.../2017/07/Mario-Vorapat.pdf · generalized Super Mario Bros.” MARIO 000000 NOR LD x oo T IME sun«n rms.
Page 3: Generalized Super Mario Bros - Assumption Universityportal.scitech.au.edu/.../2017/07/Mario-Vorapat.pdf · generalized Super Mario Bros.” MARIO 000000 NOR LD x oo T IME sun«n rms.

Goal

Page 4: Generalized Super Mario Bros - Assumption Universityportal.scitech.au.edu/.../2017/07/Mario-Vorapat.pdf · generalized Super Mario Bros.” MARIO 000000 NOR LD x oo T IME sun«n rms.

Proving NP-Completeness

• The problem must be NP

• Other NP-Problem can be reduced to the problem

Page 5: Generalized Super Mario Bros - Assumption Universityportal.scitech.au.edu/.../2017/07/Mario-Vorapat.pdf · generalized Super Mario Bros.” MARIO 000000 NOR LD x oo T IME sun«n rms.

Is it in NP?

• Non-Deterministic Polynomial Time

• Decision -> True or False

• Guess until accepting a branch (Non-Deterministic Turing Machine)

Page 6: Generalized Super Mario Bros - Assumption Universityportal.scitech.au.edu/.../2017/07/Mario-Vorapat.pdf · generalized Super Mario Bros.” MARIO 000000 NOR LD x oo T IME sun«n rms.

Choices

Page 7: Generalized Super Mario Bros - Assumption Universityportal.scitech.au.edu/.../2017/07/Mario-Vorapat.pdf · generalized Super Mario Bros.” MARIO 000000 NOR LD x oo T IME sun«n rms.

3-SAT

• Assign variables such that all clauses are true

• (x1 v x2 v x3) ^ (x4 v x5 v x6) ^ (x7 v x8 v x9)

• xi stands for variable

• () stands for clause

Page 8: Generalized Super Mario Bros - Assumption Universityportal.scitech.au.edu/.../2017/07/Mario-Vorapat.pdf · generalized Super Mario Bros.” MARIO 000000 NOR LD x oo T IME sun«n rms.

Calculating time complexity when reducing 3-SAT to Mario

• Assume that we have a satisfied 3-SAT problem.

• We can reduce/convert the problem into Mario problem.

• By creating Mario maps out of it.

Page 9: Generalized Super Mario Bros - Assumption Universityportal.scitech.au.edu/.../2017/07/Mario-Vorapat.pdf · generalized Super Mario Bros.” MARIO 000000 NOR LD x oo T IME sun«n rms.

Creating Mario Maps from 3-SAT

1. Iterate through all clauses => O(n)

2. Inside each clause, form a variable gadget for each three literals to form a map => O(3) => O(1)

3. Re-iterate the maps (clause gadget) to check validity => O(n)

4. Hence, we get O(n + n + 1) = O(2n + 1) = O(n), which means that we reduce 3-SAT to Mario in polynomial time.

Page 10: Generalized Super Mario Bros - Assumption Universityportal.scitech.au.edu/.../2017/07/Mario-Vorapat.pdf · generalized Super Mario Bros.” MARIO 000000 NOR LD x oo T IME sun«n rms.

Framework

Page 11: Generalized Super Mario Bros - Assumption Universityportal.scitech.au.edu/.../2017/07/Mario-Vorapat.pdf · generalized Super Mario Bros.” MARIO 000000 NOR LD x oo T IME sun«n rms.

“Assign the variables such that it satisfies the framework”

Page 12: Generalized Super Mario Bros - Assumption Universityportal.scitech.au.edu/.../2017/07/Mario-Vorapat.pdf · generalized Super Mario Bros.” MARIO 000000 NOR LD x oo T IME sun«n rms.

Start Gadget

Page 13: Generalized Super Mario Bros - Assumption Universityportal.scitech.au.edu/.../2017/07/Mario-Vorapat.pdf · generalized Super Mario Bros.” MARIO 000000 NOR LD x oo T IME sun«n rms.

Finish Gadget

Mushroom is needed!!!

Page 14: Generalized Super Mario Bros - Assumption Universityportal.scitech.au.edu/.../2017/07/Mario-Vorapat.pdf · generalized Super Mario Bros.” MARIO 000000 NOR LD x oo T IME sun«n rms.

Variable Gadget

xi

T F

Page 15: Generalized Super Mario Bros - Assumption Universityportal.scitech.au.edu/.../2017/07/Mario-Vorapat.pdf · generalized Super Mario Bros.” MARIO 000000 NOR LD x oo T IME sun«n rms.

Clause Gadget

T F

Get the star!!!

Page 16: Generalized Super Mario Bros - Assumption Universityportal.scitech.au.edu/.../2017/07/Mario-Vorapat.pdf · generalized Super Mario Bros.” MARIO 000000 NOR LD x oo T IME sun«n rms.

Crossover Gadget

T F

Page 17: Generalized Super Mario Bros - Assumption Universityportal.scitech.au.edu/.../2017/07/Mario-Vorapat.pdf · generalized Super Mario Bros.” MARIO 000000 NOR LD x oo T IME sun«n rms.
Page 18: Generalized Super Mario Bros - Assumption Universityportal.scitech.au.edu/.../2017/07/Mario-Vorapat.pdf · generalized Super Mario Bros.” MARIO 000000 NOR LD x oo T IME sun«n rms.

“It is NP-Complete to decide whether the goal is reachable from the start of a stage in

generalized Super Mario Bros.”


Recommended