0% found this document useful (0 votes)
20 views17 pages

HGBVHGFX

This project report discusses discrete mathematics concepts like game theory, graph theory, and number theory. For game theory, it analyzes the games of tic-tac-toe and snakes and ladders as graphs. It also discusses Brain Dots as a graph drawing game. The report then covers topics in graph theory including undirected and directed graphs, bipartite graphs, adjacent matrices, edge degrees, and incidence matrices. Finally, it addresses number theory tasks involving prime factors, greatest common divisors (GCD), least common multiples (LCM), Bezout coefficients, modular inverses, and RSA encryption/decryption keys.

Uploaded by

currentiology
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views17 pages

HGBVHGFX

This project report discusses discrete mathematics concepts like game theory, graph theory, and number theory. For game theory, it analyzes the games of tic-tac-toe and snakes and ladders as graphs. It also discusses Brain Dots as a graph drawing game. The report then covers topics in graph theory including undirected and directed graphs, bipartite graphs, adjacent matrices, edge degrees, and incidence matrices. Finally, it addresses number theory tasks involving prime factors, greatest common divisors (GCD), least common multiples (LCM), Bezout coefficients, modular inverses, and RSA encryption/decryption keys.

Uploaded by

currentiology
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

1

PROJECT REPORT

Session 2023-2027
• Muhammad Mahad Saffi(2023-CS-59)
• Abu Tayyab (2023-CS-54)

Supervised by:
Waqas Ali

Course:
Discrete Mathematics
2

TABLE OF CONTENTS
Contents

Q1: Game Theory ......................................................................................................................................... 3


TIC TAC TOE: ............................................................................................................................................. 3
Snakes and Ladders: ................................................................................................................................. 4
Q2: Graph Theory ......................................................................................................................................... 5
TASK 1: Undirected Graph ........................................................................................................................ 5
TASK 2: Directed Graph............................................................................................................................. 6
TASK 3:Bipartite ........................................................................................................................................ 6
TASK 4: Adjacent matrix ............................................................................................................................ 8
TASK 5: Edges Degree ............................................................................................................................... 9
TASK 6: Incidence matrix ........................................................................................................................ 10
Q3: Number Theory .................................................................................................................................... 10
TASK 1: Prime Factors ............................................................................................................................ 10
TASK 2: GCD ............................................................................................................................................ 12
TASK 3: LCM ............................................................................................................................................ 13
TASK 4: Bezout coefficients..................................................................................................................... 14
TASK 5: Modular inverse ......................................................................................................................... 15
TASK 6: RSA Encryption Key .................................................................................................................... 16
TASK 7: RSA Decryption key .................................................................................................................... 17
3

Q1: Game Theory


TIC TAC TOE:
Tic tac toe is a classic example of game which works on graph theory.
• Each square box is a node.
• Each possible move is its edge
Tic tac toe shows that it contains a directed graph. Its edges have a direction, indicating
the order of the moves. For example, the edge from X to O means that X moved first,
and then O moved.

Achieve:
In this game, we try to achieve a row of three same symbols, either X or O, in a
horizontal, vertical, or diagonal line.
Avoid:
We try to avoid filling up the board without achieving a row of three of our
symbols and we also try to avoid letting our opponent achieve a row of three of his
symbol. For this purpose, we try to implement best algorithm to do both tasks.
Generalization:
When we play this game with bigger boards like 5x5 and 10x10, it would start
forming different shapes and the moves becomes complex and maybe multiple edges or
loops also starts. So, in case of bigger boards, the graph of this game starts becoming
complex.
4

Snakes and Ladders:


• Vertices and Edges: In the context of graph theory, each square on the Snakes and Ladders
board can be considered a vertex. The dice roll determines the edges, i.e., the connections
between these vertices. For instance, from a given square, you can move to up to 6 other
squares based on the dice roll.

• Snakes and Ladders as Directed Edges: The snakes and ladders themselves can be seen as
directed edges that connect two non-adjacent vertices. If you land on a square with the base of
a ladder (or the head of a snake), you instantly move to a different vertex (the top of the ladder
or the tail of the snake) .

• Shortest Path with BFS: To find the minimum number of dice throws required to finish the
game, you can use the Breadth-First Search (BFS) algorithm. BFS is used to find the shortest path
in a graph. In this case, the shortest path would represent the minimum number of dice throws
needed to reach the last square from the first.

Brain Dots:
Brain Dots is a game where you have to draw shapes and lines to make two balls collide.
The balls and the shapes are affected by gravity and physics. This game can be seen as a
graph drawing problem, where each ball is a vertex and each shape is an edge. The goal is to
find a planar embedding of the graph, where no two edges cross. Brain Dots can be
considered as a graph drawing game, where the player has to find a planar embedding of a
graph with two vertices (the balls) and some edges (the shapes).
5

Q2: Graph Theory

TASK 1: Undirected Graph


6

TASK 2: Directed Graph

TASK 3:Bipartite
7
8

TASK 4: Adjacent matrix


9

TASK 5: Edges Degree


10

TASK 6: Incidence matrix

Q3: Number Theory

TASK 1: Prime Factors


11
12

TASK 2: GCD
13

TASK 3: LCM
14

TASK 4: Bezout coefficients


15

TASK 5: Modular inverse


16

TASK 6: RSA Encryption Key


17

TASK 7: RSA Decryption key

You might also like