CSIT111: Pre-Finals

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/204

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

205 Terms

1
New cards

LOGIC

the study of correct reasoning

2
New cards

LOGIC

analyzes propositions, which are declarative

sentences that are either true or false, but not

both at the same time

3
New cards

PROPOSITIONS

The following are examples of what:

● Canberra is the capital of Australia (True)

● Casablanca is found in Spain (False, it is in Morocco)

● Today is Wednesday (This can be true or false but not at the same time. I may be saying or typing this on a Wednesday, but you may be hearing or reading this on, say, a Monday)

4
New cards

Simple Propositions

Compound Propositions

TYPES OF PROPOSITIONS

5
New cards

Paradox

it is true and false at the same time. It is false if taken at face value, which makes the statement true, making it false again, then true again, and it goes on and on

6
New cards

Simple Propositions

These propositions have only one idea and no logical connectives or operators to connect other ideas.

7
New cards

Simple Propositions

Examples of these propositions:

> 1 + 1 = 2

> The quick brown fox jumps over the lazy dog.

> The five boxing wizards jump quickly.

8
New cards

Compound Propositions

These propositions have at least two simple propositions connected using logical connectives or operators)

9
New cards

Compound Propositions

Examples of these propositions:

> Amir is from India, but he lives in Singapore.

> Belle is Filipina and Clarice is French.

> If David is American, then he has read the New York Times.

10
New cards

Logical Operators

denote certain relationships between simple propositions

11
New cards

Truth values

determine whether something is true or false

12
New cards

True/T and False or 1 (T) and 0 (F)

Truth values have two common representations which are

13
New cards

Truth tables

list all possible combinations of truth values of the simple propositions in a compound proposition.

14
New cards

Tautology

Contradiction

Contingency

TYPES OF COMPOUND PROPOSITIONS

15
New cards

Tautology

always true no matter the truth value of the individual simple propositions

16
New cards

Contradiction

always false no matter the truth value of the individual simple propositions

17
New cards

Contingency

neither tautology nor contradiction

18
New cards

Negation (NOT)

states the opposite truth value of a statement.

19
New cards

Negation (NOT)

It is the only unary operator as it takes only one statement.

20
New cards

Negation (NOT)

can be denoted by -p, ~p, p', p̄

In C programming, it is represented by an !

21
New cards

CONJUNCTION (AND)

a proposition where all the simple statements connected must be true for the entire compound statement to be true.

22
New cards

CONJUNCTION (AND)

This can be denoted by ^

In C programming, it is represented by && (two ampersands)

23
New cards

DISJUNCTION (OR)

a proposition where at least one of the simple statements connected must be true for the entire compound statement to be true.

24
New cards

DISJUNCTION or INCLUSIVE DISJUNCTION (OR)

This is denoted by "v"

In C programming, it is denoted by ||

25
New cards

EXCLUSIVE DISJUNCTION (XOR)

a proposition where exactly one of the two simple statements connected must be true for the entire compound statement to be true.

26
New cards

EXCLUSIVE DISJUNCTION (XOR)

This is denoted by "⊕"

p ⊕ q, is read as p or q but not both

27
New cards

CONDITIONAL/IMPLICATION (IF)

proposition which is false only when its conclusion q is false and its hypothesis p is true

28
New cards

CONDITIONAL/IMPLICATION (IF)

This is denoted by p->q and is read as "if p then q" or "p implies q"

29
New cards

Biconditional (IFF)

a proposition which is true when both propositions are true, or when both are false.

30
New cards

Biconditional (IFF)

This is denoted by "↔"

p ↔ q and is read as "p if and only if q"

31
New cards

Sets

well-defined collections of objects

32
New cards

Elements

These are objects in sets. These are enclosed in curly braces {} and separated by commas

33
New cards

sets, set elements

Uppercase letters denote ___, lowercase letters can denote ___

34
New cards

In Or Out

The Symbol ∈ denotes membership and is read "is an element of", "belongs to" or "is in"

> Similarly, the symbol ∉ is read as "is not an element of", "does not belong to", or "is not in"

35
New cards

List or roster method

description method

set builder or rule method

Ways to describe a set

36
New cards

List or roster method

This method lists every element of the set

Ex: A = {3, 6, 9, 12, 15, ..., 30}

37
New cards

Description method

This method gives an informal verbal description of the set's element

Ex: A is the set of all multiples of 3 from 1 to 30

38
New cards

Set builder or rule method

This method gives a formal verbal description or rule to describe the sets elements

Ex: A = {x|x is a multiple of 3 ^ x <= 30}, read as "Set A is the set of all x such that x is a multiple of 3 and x is less than or equal to 30."

39
New cards

Cardinality

the number of elements in a set.

> For set A, it is denoted be n(A).

40
New cards

Finite sets

These sets have countable numbers of elements

41
New cards

Infinite sets

These sets have an infinite number of elements. > Cardinality is infinite (∞)

42
New cards

Null/Empty set ∅ or {}

These sets have no element (cardinality = 0)

43
New cards

Singleton set

This set has only one element (cardinality = 1)

44
New cards

Equal sets

have the same elements (no matter the repetition or order)

45
New cards

Subset

(A ⊆ B)

A is a ___ of B if all elements in A are in B. Also read as "A is contained by B".

46
New cards

Superset

(B ⊇ A)

B is a ___ of A if it contains all elements of A. Also read as "B contains A".

47
New cards

Proper subset

(A ⊂ B)

A is a ___ of B if A is a subset of B and B has at least one element not in A.

48
New cards

Proper Superset

(B ⊃ A)

B is a _____ of A if it contains all elements of A and one or more elements not in A.

49
New cards

Power Sets

The set of all possible subsets of a set A.

> Cardinality (Size): If a set has n elements, its power set contains 2^n elements.

50
New cards

universal set U

the set containing all elements for a particular discussion

51
New cards

Union

Combines all elements from both Set A and Set B.

> denoted by A U B

52
New cards

Intersection

The set of elements common to both Set A and Set B

> denoted by A ∩ B

53
New cards

Complement

Elements in the Universal Set (U) that are NOT inside Set A

> denoted A' or

54
New cards

Difference

Elements found in Set A but NOT in Set B.

> denoted by A - B

55
New cards

Venn diagrams

These can be used to illustrate the contents of sets and where they belong

56
New cards

Algorithm

a step-by-step way of getting something done, just like computer programs or processes.

57
New cards

Flowchart

a diagram depicting the flow and logic of a process or system such as a computer program or an algorithm

58
New cards

Flowchart

It uses simple shapes and a set of standard symbols to define the type of step and the sequence

59
New cards

Flowchart

helps you outline a computer program or process or algorithm clearly•

60
New cards

Data

information manipulated internally by a computer.

61
New cards

Data Structure

way of organizing data in a computer so it could be used effectively.

62
New cards

Array

holds items of the same type

63
New cards

Element

an item stored in the array.

64
New cards

Index

Location of an element in an array. It is used to identify the element. The index of the first element of an array is typically 0

65
New cards

Linked List / List

a data structure that decides the arrangement of data with a pointer (reference to the memory address of data) to the next element with the option to pointer to the previous one

66
New cards

Stack

follows the Last In, First Out (LIFO) principle. Elements are added and removed from the same end, known as the top

67
New cards

Push

insert an item on top of the stack.

68
New cards

Pop

remove an item from the top of the stack.

69
New cards

Queue

follows the First In, First Out (FIFO) principle. Elements are added at one end called the rear, and removed from the other end called the front

70
New cards

Enqueue

insert an item into the rear of the queue.

71
New cards

Dequeue

remove an item from the front of the queue.

72
New cards

Tree

nonlinear hierarchical data structure consisting of nodes connected by edges.

73
New cards

Node

corresponds to data.

74
New cards

Branch / Edge

connects a node to another.

75
New cards

Root

highest-order node. Has no parent.

76
New cards

Child

node branching off under a node

77
New cards

Parent

original data before it begins to branch

78
New cards

Sibling

has a common parent and is on the same level.

79
New cards

Leaf

lowest-order node. Has no children.

80
New cards

Internal node

a node that is not a leaf.

81
New cards

Subtree

tree of all descendants of a node

82
New cards

Binary Tree

a type of tree which has up to two children.

83
New cards

Terminator, Process, Data or Input/Output, Directional Flow, Decision

Symbols used in Flowcharting

84
New cards

Terminator

> This symbol is represented by an oblong/oval/pill

> marks the start and the ends of the process

85
New cards

Process

> represented by a rectangle

> marks an action or step in the process

86
New cards

Input/Output

> represented by a parallelogram

> marks where a system input or a system output takes place

87
New cards

Directional Flow

> represented by arrows with the arrowhead indicating the direction

> represent the paths a flowchart's user takes between steps

> dotted or dashed arrows can represent alternate paths

88
New cards

Decision

> represented by a diamond

> represent decisions to be made, often based on a true.false or yes/no questions

89
New cards

Sequential Logic

simplest type of logic simply executing instructions one after another/one at a time

90
New cards

Conditional Logic

type of logic deciding the next instructions to follow based on certain conditions

91
New cards

Iterative Logic

Type of logic repeating execution of a set of instructions

92
New cards

Computer programs

collections of text that commands computers to perform algorithms.

93
New cards

Programming languages

allow users to write programs to the computer

94
New cards

Machine language

Assembly language/low-level language

high-level language

Types of Programming Languages

95
New cards

Machine language

consists of only 0s and 1s. Can be understood by hardware but not by humans.

96
New cards

Assembly language/Low-level language

machine-centric language executed quickly. Humans will have some difficulty understanding this sort of language.

> Examples: x86 assembly, x64 assembly.

97
New cards

High-level language

highly-readable languages easily understood by humans. Must be converted to low-level languages by either interpreters or compilers.

> Examples: C, C++, Python, Java, C#, FORTRAN, COBOL

98
New cards

C

a procedural language developed by Dennis Ritchie and is widely used for system development

99
New cards

C++

language with highly similar syntax to C developed by Bjarne Stroustrup. Suitable for system development while also being suitable for object-oriented programming. It is used in systems programming (including embedded systems such as Arduino [9]), and application programming

100
New cards

Java

another object-oriented programming language developed by James Gosling which can run on different hardware as long as a Java Virtual Machine (JVM) is installed

Widely used in Android