4.2 Finite State Machines Flashcards

(26 cards)

1
Q

What is a finite state machine ?

A

A computational model for a machine that is always in a fixed state

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What’s special about FSM’s ?

A

Has a finite number of states and can only ever be in one state at a point in time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are transition rules ?

A

Rules that describe what a FSM should do given certain criteria

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How are states represented in state transmission diagram ?

A

Circles

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How are transitions represented in state transmission diagram ?

A

Arrows

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How are accepting state represented in state transmission diagram ?

A

Double Circle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a common example of FSMs ?

A

Parity Check

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a graph ?

A

An abstract data structure representing complex relationships

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a weighted graph ?

A

A graph where edges may have weights indicating a cost of traversal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a Vertex/Node ?

A

A fundamental part of graph where edges connect

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is an Edge/Arc ?

A

A connection between two vertices in a graph

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is an Undirected Graph ?

A

A graph where edges are bidirectional and there are no arrows indicating direction.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a Directed Graph ?

A

A graph where edges have a direction indicating a one-way connection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is an Adjacency Matrix ?

A

A way to represent a graph using a matrix to indicate connections between vertices

Each column and row represents a node and the item at [row,column] indicates a connection

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is an Adjacency List ?

A

A way to represent a graph using a list where each vertex has a list of connected vertices.

A list of nodes is created and each node points to a list of adjacent nodes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a Bidirectional Edge ?

A

An edge is an undirected graph that allows traversal in both directions

17
Q

What is an Unweighted Graph ?

A

A directed graph that has no weights associated with its edges

18
Q

What are typical uses of graphs ?

A

Applications such as networking and routing

19
Q

What is the Cost of Traversal ?

A

The weight associated with an edge in a weighted graph .

20
Q

What is a Directed Graph ?

A

A graph where all edges are one-way.

21
Q

How is an Unweighted Graph represented in an adjacency matrix ?

A

Connections can be represented by a 1

22
Q

How is a Weighted , undirected graph represented in an adjacency matrix ?

A

The matrix is symmetric and the entries represent the weights of the edges.

23
Q

What is a sparse graph ?

A

A graph with not many connections(edges), leaving cells empty , wasting memory space.

24
Q

How could a weighted graph be represented in code ?

A

Dictionary of Dictionaries where each key being the node and the value being a dictionary of adjacent nodes and edge weights

25
What are Social Networks ?
Graphs representing relationships between individuals or entities
26
What are Web Pages ?
Nodes represent web pages and Edges represent links between them.