DS102 - DATA STRUCTURE 2

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/49

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 4:04 AM on 10/8/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

50 Terms

1
New cards

Counting

A basic mathematical tool that has uses in the most diverse circumstances

2
New cards

Product and Sum Rules

Represent the most intuitive notions of counting

3
New cards

Product Rule

Suppose there are n(A) ways to perform task A, and regardless of how task A is performed, there are n(B) ways to perform task B

4
New cards

Product Rule Formula

n(A) · n(B)

5
New cards

Sum Rule

Suppose there are n(A) ways to perform task A, and distinct from these, there are n(B) ways to perform task B

6
New cards

Sum Rule Formula

n(A) + n(B)

7
New cards

Sum Rule for Multiple Tasks

n(A) + n(B) + n(C)

8
New cards

Inclusion and Exclusion Principle

A counting principle used when sets overlap. It prevents elements that belong to more than one set from being counted more than once

9
New cards

Inclusion and Exclusion Principle For two sets formula

|A ∪ B| = |A| + |B| − |A ∩ B|

10
New cards

Inclusion and Exclusion Principle For three sets formula

|A ∪ B ∪ C| = |A| + |B| + |C| − |A ∩ B| − |A ∩ C| − |B ∩ C| + |A ∩ B ∩ C|

11
New cards

Pigeonhole Principle

If (k + 1) or more objects are placed into k boxes, then there is at least one box containing two or more of the objects

12
New cards

Permutation

An ordered arrangement of distinct objects

13
New cards

r-permutation

The arrangement of r-elements of a set

14
New cards

Permutation Formula

P(n,r) = n! / (n − r)!

15
New cards

Combination

An r-combination of elements of a set is an unordered selection of r elements from the set

16
New cards

Pascal’s Triangle

A triangular array constructed by summing adjacent elements in preceding rows. It is named after the French mathematician Blaise Pascal

17
New cards

Pascal’s Triangle Rule

Each number is the sum of the numbers to its upper left and upper right

18
New cards

Binomial Coefficient

The number of ways of picking unordered outcomes from possibilities, also known as a combination or combinatorial number

19
New cards

Algorithms

A topic included in the lecture before Cryptography

20
New cards

Cryptography

The subject of transforming information so that it cannot be easily recovered without special knowledge

21
New cards

Classical Cryptography

Cryptography involving traditional methods of transforming messages into secret forms

22
New cards

Encryption

The process of making a message secret

23
New cards

Caesar’s Cipher / Shift Cipher

f(p) = (p + n) mod 26

24
New cards

Julius Caesar’s Cipher / Shift Cipher

Uses two aligned alphabets. A shift parameter is used as the key

25
New cards

Caesar’s Cipher

Each letter of the message in the "plain" line is matched with the corresponding letter in the "cipher" line

26
New cards

Caesar’s Encryption

Can be represented using modular arithmetic by transforming letters into numbers

27
New cards

Encryption Formula

f(p) = (p + n) mod 26

28
New cards

Decryption

The process of determining the original message from the encrypted message

29
New cards

Decryption Formula

f⁻¹(p) = (p − n) mod 26

30
New cards

Caesar’s Decryption

Uses the same letter-to-number system

31
New cards

Decryption Formula

f⁻¹(p) = (p − n) mod 26

32
New cards

Trees

In 1857, English mathematician Arthur Cayley used trees to count certain types of chemical compounds

33
New cards

Tree

A connected undirected graph with no simple circuits

34
New cards

Theorem

An undirected graph is a tree if and only if there is a unique simple path between any of its vertices

35
New cards

Node

In tree data structure, every individual element is called

36
New cards

Root

In a tree data structure, the first node is called

37
New cards

Edge

In a tree data structure, the connecting link between any two nodes is called

38
New cards

Parent

In a tree data structure, the node which is predecessor of any node is called

39
New cards

Child

In a tree data structure, the node which is descendant of any node is called

40
New cards

Siblings

In a tree data structure, nodes which belong to same Parent are called

41
New cards

Leaf

In a tree data structure, the node which does not have a child is called

42
New cards

Internal Nodes

In a tree data structure, the node which has at least one child is called

43
New cards

Degree

In a tree data structure, the total number of children of a node is called

44
New cards

Level

In a tree data structure, the root node is said to be at Level 0. The children of the root node are at Level 1, and the children of the nodes at Level 1 are at Level 2, and so on

45
New cards

Height

In a tree data structure, the total number of edges from a leaf node to a particular node in the longest path is called

46
New cards

Depth

In a tree data structure, the total number of edges from root node to a particular node is called

47
New cards

Path

In a tree data structure, the sequence of Nodes and Edges from one node to another node is called as ____ between those two Nodes

48
New cards

Sub tree

In a tree data structure, each child from a node forms a subtree recursively. Every child node will form a subtree on its parent node

49
New cards

Leftmost Derivation

The derivation proceeds by replacing the leftmost nonterminal first

50
New cards

Rightmost Derivation

The derivation proceeds by replacing the rightmost nonterminal first