UNIT 1
UNIT 1
programmed to think and learn like humans. The goal of AI is to develop systems that can perform
tasks that typically require human intelligence, such as visual perception, speech recognition,
decision-making, and language translation.
AI encompasses a broad range of techniques and approaches, including machine learning (where
machines learn from data), natural language processing (enabling machines to understand and
generate human language), computer vision (enabling machines to interpret visual information), and
robotics (combining AI with physical machines).
1. **Learning**: AI systems can learn from data, improving their performance over time without
human intervention.
2. **Reasoning**: AI systems can apply rules and logic to reach conclusions or make decisions.
3. **Problem-solving**: AI systems can analyze large amounts of data to identify patterns and solve
complex problems.
4. **Perception**: AI systems can interpret and understand the world through sensors, data, and
human input.
5. **Natural interaction**: AI systems can interact with humans in natural language and respond
appropriately.
AI is used in various applications across industries, from virtual assistants like Siri and Alexa to
autonomous vehicles, medical diagnostics, finance, and entertainment. As AI technology continues
to advance, it raises important ethical and societal questions regarding its impact on jobs, privacy,
and the future of humanity.
DEFINING AI TECHNIQUES
Artificial Intelligence (AI) encompasses a variety of techniques and methodologies that enable
machines to mimic human cognitive functions. Here are some key AI techniques:
2. **Deep Learning**:
- A subset of machine learning that uses neural networks with many layers (deep neural networks)
to learn patterns from large amounts of data.
- Widely used in tasks such as image and speech recognition, natural language processing, and
autonomous driving.
4. **Computer Vision**:
- Techniques that enable machines to interpret and understand visual information from the world.
- Includes tasks such as object detection, image segmentation, facial recognition, and image
generation.
7. **Robotics**:
- Combines AI techniques with physical systems to create autonomous or semi-autonomous robots
that can perceive and interact with the physical world.
- Includes areas such as robot motion planning, manipulation, and human-robot interaction.
These AI techniques are often used in combination to tackle complex problems and achieve human-
like capabilities in various domains. The field of AI continues to evolve rapidly with advancements in
algorithms, computing power, and data availability, driving innovation across industries and
applications.
- **Variables**: Represent placeholders for objects or individuals. Variables are used to make
predicates general and applicable to any instance within their domain. Common variables include \
( x \), \( y \), \( z \), etc.
A **computable function** is a function for which there exists an algorithm that can compute its
values to arbitrary precision. In other words, a function \( f \) is computable if there exists a Turing
machine (or any equivalent model of computation) that, given any input \( x \), can compute \( f(x) \)
in a finite number of steps.
2. **Turing Machine**: The concept of computability is often linked to Turing machines, which are
theoretical models of computation. If a function can be computed by a Turing machine, it is
considered computable.
3. **Examples**:
- Addition and multiplication of integers are computable functions.
- Trigonometric functions like sine and cosine are computable using numerical methods.
1. **Decision Problem**: A computable predicate typically involves a decision problem where, for
any given input, the predicate can be evaluated to either true or false.
2. **Formal Representation**: Computable predicates are often expressed using logical symbols and
quantifiers. For example, \( \text{Prime}(x) \) could denote the predicate that determines whether \(
x \) is a prime number.
3. **Examples**:
- \( \text{Prime}(x) \): Determines whether \( x \) is a prime number.
- \( \text{Even}(x) \): Determines whether \( x \) is an even number.
- \( \text{Divisible}(x, y) \): Determines whether \( x \) is divisible by \( y \).
Computability theory explores the boundaries of what can be computed and what cannot be
computed by any algorithmic process. It investigates questions such as:
This theory is foundational in understanding the capabilities and limitations of computers, and it
forms the basis for many branches of theoretical computer science and mathematics.
Declarative knowledge refers to factual knowledge about the world, often expressed as statements
of truth. It involves knowing *that* something is the case, without necessarily knowing how to use
or apply that knowledge in practice. Declarative knowledge can be:
Procedural knowledge, on the other hand, is knowledge about how to do things, often expressed as
a sequence of steps or actions needed to accomplish a specific task. It involves knowing *how* to
perform a procedure or execute a task. Procedural knowledge is:
- **Action-oriented**: It involves knowing the steps or actions required to achieve a particular goal.
- **Context-dependent**: It may vary depending on the situation or context.
- **Dynamic**: It often involves skills that can improve with practice and experience.
**Examples**:
- Riding a bicycle.
- Playing a musical instrument.
- Solving a mathematical problem using a specific method (e.g., long division).
- **Learning and Acquisition**: In learning contexts, acquiring procedural knowledge often involves
practice and repetition, while declarative knowledge can be acquired through reading, listening, or
observing.
- **In AI and Cognitive Science**: Declarative knowledge can be represented as facts or rules in AI
systems, while procedural knowledge is often implemented through algorithms or processes that
perform specific tasks.
Understanding the distinction between procedural and declarative knowledge is crucial for designing
effective learning strategies, developing AI systems, and exploring how humans acquire and apply
knowledge in different domains.
LOGIC PROGRAMMING
Logic programming is a paradigm within computer science and artificial intelligence that uses logic-
based formalism to express programs. It primarily relies on the principles of mathematical logic to
represent knowledge and solve problems. Here are the key aspects of logic programming:
3. **Rules**: Logical implications that define relationships based on other facts or rules. For
instance, `ancestor(X, Y) :- parent(X, Y)` states that X is an ancestor of Y if X is a parent of Y.
4. **Queries**: Questions or goals that the logic program seeks to answer. For example, a query in
Prolog might be `ancestor(john, mary)`, asking whether John is an ancestor of Mary.
- **Resolution**: Logic programming languages use a process akin to logical resolution to match
queries against facts and rules, deriving conclusions by unifying terms and applying logical inference
rules.
### Applications
- **Expert Systems**: Logic programming is used in expert systems to represent knowledge and
infer solutions based on logical rules and facts.
- **Natural Language Processing**: It's used in parsing and understanding natural language
statements due to its ability to handle symbolic representation and inference.
- **Databases**: Logic programming languages like Datalog are used in querying databases where
relationships can be expressed as logical rules.
In Prolog, a simple program might define family relationships and query them:
```prolog
% Facts
parent(john, mary).
parent(john, peter).
parent(peter, anne).
% Rules
ancestor(X, Y) :- parent(X, Y).
ancestor(X, Y) :- parent(X, Z), ancestor(Z, Y).
% Query
?- ancestor(john, anne).
```
### Strengths
- **Declarative Nature**: Programs in logic programming are often concise and declarative, focusing
on what needs to be solved rather than how to solve it.
- **Inference Mechanism**: Logic programming leverages logical inference, which can be powerful
for certain types of problems, especially those involving symbolic reasoning and knowledge
representation.