Logic Flashcards

1
Q

What is Logic?

A

Logic provides reasoning techniques that enable deriving knowledge in a systematic way

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

Define Logic;

A

Logic is about formalising knowledge & reasoning in a precise, unambiguous in a rigorous way.

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

What do logical rules do?

A

Use rules to derive knowledge

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

What is understanding /modelling?

A

Program follows its specification

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

What is formalisation/ rigour?

A

Programs works as should before changing it

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

What is proof/correctness?

A

Verify mathematical results

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

What is computation/automation?

A

Prove things about your program
-What can be computed / How fast
-Solve hard problems

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

What is Propositional Logic?

A

Sentence which states a fact
- That can be True/False

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

What is an Argument

A

A list of Propositions
- Last is called CONCLUSION
- Others are called PREMISES

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

When is an Argument Valid?

A

is Valid IF AND ONLY IF, when premise is true so is the conclusion

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

Assumptions have to …

A

… perfectly fit the environment you want it set in

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

Define Symbolic Logic

A
  • Formal language that allows conducting logical reasoning through the manipulation of symbols.
  • Defined by grammar that allows deriving formula from collection of symbols
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the 2 aspects of a Language?

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

Define Syntax:

A

Well formed sequences of symbols
DEFINED BY GRAMMAR

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

Define Semantics:

A

Assigns meaning to those Symbols

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

What does BNF stand for?

A

BNF - Backus Naur Form

17
Q

What does BNF define?

A

Defines Context-Free-Grammar

18
Q

What does
lhs :: = rhs1 |…| rhsn represent?

A

Left hand side (lhs) can expand to any forms rhs1 to rhsn
Right hand side

19
Q

What is Non-Terminal?

A

-Left Hand Side of lhs :: = rhs1 |…| rhsn
- Can be expanded
- Occurs left to the rules

20
Q

What does rhsi represent?

A

Each rhsi is a sequence of non-terminal and terminal symbols

21
Q

What is Arity?

A

The number of Arguments terminal symbols take

22
Q

What is the Arity of +/*?

A

2
- Binary Infix Operators

23
Q

What is the Arity of 0/1?

A

1
- Called CONSTANTS
- NULLARY OPERATORS

24
Q

What is Arity of AND,OR & IMPLIES?

A

2

25
Q

What is Arity of NOT?

A

1

26
Q

Define Infix:

A

In between 2 expressions / arguments

27
Q

Define Fixity:

A

Place where it occurs with reference to its Arguments

28
Q

Define Prefix:

A

Goes before expression/ Argument

29
Q

Define Postfix:

A

Occurs after expressions/ Argument

30
Q

How to fix AMBIGUITY?

A

Use Brackets and Parentheses

31
Q

Give an Example of BNF arithmetic Expression:

A

exp ::= num |exp+exp|exp * exp

-exp on LHS is non-terminal symbol
- +,*,1,0 are terminal symbol
- num —> numeral is a sequence of digits
-

32
Q

What is Meta Variables?

A

Act as placeholders for any variable
-exp can act as placeholder

33
Q

How are Propositional Logic built?

A

Combining Atomic Proposition & Logical Connectives

34
Q

What is a ATOMIC PROPOSTION?

A

Can be True/ False
- Cannot be decomposed further

35
Q

Define NEGATION:

A

if A is True
- then ¬A is False

36
Q
A