Professional Documents
Culture Documents
AI MCA0301
AI MCA0301
1. What is AI? Mention it's applications and its impact in the society ?
Ans:- Artificial intelligence is the simulation of human intelligence processes by
machines, especially computer systems. Specific applications of AI include expert
systems, natural language processing, speech recognition and machine vision.
The ideal characteristic of artificial intelligence is its ability to rationalize and take
actions that have the best chance of achieving a specific goal. A subset of artificial
intelligence is machine learning (ML), which refers to the concept that computer
programs can automatically learn from and adapt to new data without being assisted
by humans. Deep learning techniques enable this automatic learning through the
absorption of huge amounts of unstructured data such as text, images, or video.
Artificial intelligence is based on the principle that human intelligence can be defined
in a way that a machine can easily mimic it and execute tasks, from the most simple to
those that are even more complex. The goals of artificial intelligence include
mimicking human cognitive activity. Researchers and developers in the field are
making surprisingly rapid strides in mimicking activities such as learning, reasoning,
and perception, to the extent that these can be concretely defined.
1. AI Application in E-Commerce
Personalized Shopping
AI-Powered Assistants
Virtual shopping assistants and chatbots help improve the user experience while
shopping online. Natural Language Processing is used to make the conversation sound
as human and personal as possible. Moreover, these assistants can have real-time
engagement with your customers. Did you know that on amazon.com, soon, customer
service could be handled by chatbots?
Fraud Prevention
Credit card frauds and fake reviews are two of the most significant issues that E-
Commerce companies deal with. By considering the usage patterns, AI can help
reduce the possibility of credit card fraud taking place.
Although the education sector is the one most influenced by humans, Artificial
Intelligence has slowly begun to seep its roots into the education sector as well. Even
in the education sector, this slow transition of Artificial Intelligence has helped
increase productivity among faculties and helped them concentrate more on students
than office or administration work.
Artificial Intelligence can help educators with non-educational tasks like task-related
duties like facilitating and automating personalized messages to students, back-office
tasks like grading paperwork, arranging and facilitating parent and guardian
interactions, routine issue feedback facilitating, managing enrollment, courses, and
HR-related topics.
Digitization of content like video lectures, conferences, and textbook guides can be
made using Artificial Intelligence.
Voice Assistants
Without even the direct involvement of the lecturer or the teacher, a student can access
extra learning material or assistance through Voice Assistants.
Personalized Learning
Artificial Intelligence has a lot of influence on our lifestyle. Let us discuss a few of
them.
Autonomous Vehicles
Automobile manufacturing companies like Toyota, Audi, Volvo, and Tesla use
machine learning to train computers to think and evolve like humans when it comes to
driving in any environment and object detection to avoid accidents.
Spam Filters
The email that we use in our day-to-day lives has AI that filters out spam emails
sending them to spam or trash folders, letting us see the filtered content only.
Facial Recognition
Our favorite devices like our phones, laptops, and PCs use facial recognition
techniques by using face filters to detect and identify in order to provide secure access.
Based on research from MIT, GPS technology can provide users with accurate, timely,
and detailed information to improve safety. The technology uses a combination of
Convolutional Neural Networks and Graph Neural Networks, which makes lives easier
for users by automatically detecting the number of lanes and road types behind
obstructions on the roads.
Robotics is another field where Artificial Intelligence applications are commonly used.
Robots powered by AI use real-time updates to sense obstacles in its path and pre-plan
its journey instantly.
Artificial Intelligence helps with blind hiring. Using machine learning software, you
can examine applications based on specific parameters. AI drive systems can scan job
candidates' profiles, and resumes to provide recruiters an understanding of the talent
pool they must choose from.
We utilize and rely on technology in our daily lives, and our technical requirements
and demands continue to grow. Technology is used by humans to explore, connect,
study, and do work. The manner in which we use technology decides whether its
effects are beneficial or detrimental for society.
As we know that everything present on this planet has both advantages and
disadvantages. The same goes for technology it also has negative impacts on society
and some other negative impacts are:
Social Issues:
Following are some social issues that we face while using the internet:
Identity Theft: To use the identity of some other person by getting his financial/
personal information in a fraud manner in order to commit a crime.
Gaming Addiction: An individual’s capacity to perform in multiple life domains
is severely affected as a result of the excessive use of internet games over a long
period of time.
Health and Fitness: Using a lot of the internet lay an impact on health and
fitness, it may impact your eyesight, backbone, etc.
Cyberbullying: The use of technology to bully, abuse, criticize, or target another
person is known as cyberbullying.
Terrorism and Crime: Theft of our cyber-infrastructure, as well as digital
information such as software, hardware, data, or information, is considered
cyberterrorism.
2. Write about intelligent agent, computer vision and natural language processing?
Ans:- An agent can be anything that perceiveits environment through sensors and act
upon that environment through actuators. An Agent runs in the cycle of perceiving,
thinking, and acting. An agent can be:
Human-Agent: A human agent has eyes, ears, and other organs which work for
sensors and hand, legs, vocal tract work for actuators.
Robotic Agent: A robotic agent can have cameras, infrared range finder, NLP
for sensors and various motors for actuators.
Software Agent: Software agent can have keystrokes, file contents as sensory
input and act on those inputs and display output on the screen.
Hence the world around us is full of agents such as thermostat, cellphone, camera, and
even we are also agents.
Before moving forward, we should first know about sensors, effectors, and actuators.
Sensor: Sensor is a device which detects the change in the environment and sends the
information to other electronic devices. An agent observes its environment through
sensors.
Actuators: Actuators are the component of machines that converts energy into motion.
The actuators are only responsible for moving and controlling a system. An actuator
can be an electric motor, gears, rails, etc.
Effectors: Effectors are the devices which affect the environment. Effectors can be
legs, wheels, arms, fingers, wings, fins, and display screen.
Intelligent Agents:
Rational Agent:
A rational agent is an agent which has clear preference, models uncertainty, and acts in
a way to maximize its performance measure with all possible actions.
A rational agent is said to perform the right things. AI is about creating rational agents
to use for game theory and decision theory for various real-world scenarios.
Computer vision and NLP are both branches of artificial intelligence that aim to enable
machines to understand and generate natural language and visual content. They can
complement each other in tasks such as image captioning, visual question answering,
or face recognition with speech synthesis. However, integrating computer vision and
NLP also poses some challenges, such as dealing with noisy or ambiguous data,
aligning multimodal representations, or ensuring coherence and consistency across
modalities.
Computer vision and robotics
Computer vision and robotics are closely related fields that share the goal of enabling
machines to perceive and interact with the physical world. They can benefit from each
other in tasks such as object detection, navigation, manipulation, or human-robot
collaboration. However, integrating computer vision and robotics also requires some
considerations, such as adapting to dynamic and uncertain environments, coping with
latency and bandwidth constraints, or balancing between exploration and exploitation.
3. What are the different types of searching techniques for problems solving?
Write about them?
Artificial intelligence is being used by programmers all around the world to automate
systems for effective both resource and time management. Games and puzzles can
pose some of the most frequent issues in daily life. The use of ai algorithms may
effectively tackle this. Various problem-solving methods are implemented to create
solutions for a variety complex puzzles, includes mathematics challenges such crypto-
arithmetic and magic squares, logical puzzles including Boolean formulae as well as
N-Queens, and quite well games like Sudoku and Chess. Therefore, these below
represent some of the most common issues that artificial intelligence has remedied:
Chess
N-Queen problem
Tower of Hanoi Problem
Travelling Salesman Problem
Water-Jug Problem
A Reflex Agent: But What's It?
Depending on their ability for recognising intelligence, these five main artificial
intelligence agents were deployed today. The below would these be agencies:
This mapping of states and actions is made easier through these agencies. These agents
frequently make mistakes when moving onto the subsequent phase of a complicated
issue; hence, problem-solving standardized criteria such cases. Those agents employ
artificial intelligence can tackle issues utilising methods like B-tree and heuristic
algorithms.
Heuristics
The heuristic approach focuses solely upon experimentation as well as test procedures
to comprehend a problem and create a solution. These heuristics don't always offer
better ideal answer to something like a particular issue, though. Such, however,
unquestionably provide effective means of achieving short-term objectives.
Consequently, if conventional techniques are unable to solve the issue effectively,
developers turn to them. Heuristics are employed in conjunction with optimization
algorithms to increase the efficiency because they merely offer moment alternatives
while compromising precision.
Searching Algorithms
Several of the fundamental ways that AI solves every challenge is through searching.
These searching algorithms are used by rational agents or problem-solving agents for
select the most appropriate answers. Intelligent entities use molecular representations
and seem to be frequently main objective when finding solutions. Depending upon that
calibre of the solutions they produce, most searching algorithms also have attributes of
completeness, optimality, time complexity, and high computational.
Computing Evolutionary
This approach to issue makes use of the well-established evolutionary idea. The idea
of "survival of the fittest underlies the evolutionary theory. According to this, when a
creature successfully reproduces in a tough or changing environment, these coping
mechanisms are eventually passed down to the later generations, leading to something
like a variety of new young species. By combining several traits that go along with
that severe environment, these mutated animals aren't just clones of something like the
old ones. The much more notable example as to how development is changed and
expanded is humanity, which have done so as a consequence of the accumulation of
advantageous mutations over countless generations.
Genetic Algorithms
Genetic algorithms have been proposed upon that evolutionary theory. These programs
employ a technique called direct random search. In order to combine the two healthiest
possibilities and produce a desirable offspring, the developers calculate the fit factor.
Overall health of each individual is determined by first gathering demographic
information and afterwards assessing each individual. According on how well each
member matches that intended need, a calculation is made. Next, its creators employ a
variety of methodologies to retain their finest participants.
1. Rank Selection
2. Tournament Selection
3. Steady Selection
4. Roulette Wheel Selection (Fitness Proportionate Selection)
5. Elitism
Ans:- BFS algorithm in the data structure. Breadth-first search is a graph traversal
algorithm that starts traversing the graph from the root node and explores all the
neighboring nodes. Then, it selects the nearest node and explores all the unexplored
nodes. While using BFS for traversal, any node in the graph can be considered as the
root node.
There are many ways to traverse the graph, but among them, BFS is the most
commonly used approach. It is a recursive algorithm to search all the vertices of a tree
or graph data structure. BFS puts every vertex of the graph into two categories -
visited and non-visited. It selects a single node in a graph and, after that, visits all the
nodes adjacent to the selected node.
Algorithm
The steps involved in the BFS algorithm to explore a graph are given as follows -
Step 2: Enqueue the starting node A and set its STATUS = 2 (waiting state)
Step 4: Dequeue a node N. Process it and set its STATUS = 3 (processed state).
Step 5: Enqueue all the neighbours of N that are in the ready state (whose STATUS =
1) and set
their STATUS = 2
(waiting state)
[END OF LOOP]
Step 6: EXIT
Now, let's understand the working of BFS algorithm by using an example. In the
example given below, there is a directed graph having 7 vertices.
In the above graph, minimum path 'P' can be found by using the BFS that will start
from Node A and end at Node E. The algorithm uses two queues, namely QUEUE1
and QUEUE2. QUEUE1 holds all the nodes that are to be processed, while QUEUE2
holds all the nodes that are processed and deleted from QUEUE1.
Breadth-first search
Advantages of BFS:
1. The solution will definitely found out by BFS If there is some solution.
2. BFS will never get trapped in a blind alley, which means unwanted nodes.
3. If there is more than one solution then it will find a solution with minimal steps.
Disadvantages Of BFS:
1. Memory Constraints As it stores all the nodes of the present level to go for the next
level.
2. If a solution is far away then it consumes time.
Application Of BFS:
1. Finding the Shortest Path.
2. Checking graph with petiteness.
3. Copying Cheney's Algorithm.
Depth-first search
Advantages Of DFS:
1. The memory requirement is Linear WRT Nodes.
2. Less time and space complexity rather than BFS.
3. The solution can be found out without much more search.
Applications of DFS:-
1. Finding Connected components.
2. Topological sorting.
3. Finding Bridges of the graph.
Because of the recursive nature, stack data structure can be used to implement the DFS
algorithm. The process of implementing the DFS is similar to the BFS algorithm.
The step by step process to implement the DFS traversal is given as follows -
1. First, create a stack with the total number of vertices in the graph.
2. Now, choose any vertex as the starting point of traversal, and push that vertex
into the stack.
3. After that, push a non-visited vertex (adjacent to the vertex on the top of the
stack) to the top of the stack.
4. Now, repeat steps 3 and 4 until no vertices are left to visit from the vertex on the
stack's top.
5. If no vertex is left, go back and pop a vertex from the stack.
6. Repeat steps 2, 3, and 4 until the stack is empty.
Algorithm
Step 2: Push the starting node A on the stack and set its STATUS = 2 (waiting state)
Step 4: Pop the top node N. Process it and set its STATUS = 3 (processed state)
Step 5: Push on the stack all the neighbors of N that are in the ready state (whose
STATUS = 1) and set their STATUS = 2 (waiting state)
Memory requirement is only linear with respect to the search graph. This is in
contrast with breadth-first search which requires more space. The reason is that
the algorithm only needs to store a stack of nodes on the path from the root to
the current node.
The time complexity of a depth-first Search to depth d and branching factor b
(the number of children at each node, the outdegree) is O(bd) since it generates
the same set of nodes as breadth-first search, but simply in a different order.
Thus practically depth-first search is time-limited rather than space-limited.
If depth-first search finds solution without exploring much in a path then the
time and space it takes will be very less.
DFS requires less memory since only the nodes on the current path are stored.
By chance DFS may find a solution without examining much of the search
space at all.
In Hill Climbing, the algorithm starts with an initial solution and then iteratively
makes small changes to it in order to improve the solution. These changes are
based on a heuristic function that evaluates the quality of the solution. The
algorithm continues to make these small changes until it reaches a local
maximum, meaning that no further improvement can be made with the current
set of moves.
There are several variations of Hill Climbing, including steepest ascent Hill
Climbing, first-choice Hill Climbing, and simulated annealing. In steepest
ascent Hill Climbing, the algorithm evaluates all the possible moves from the
current solution and selects the one that leads to the best improvement. In first-
choice Hill Climbing, the algorithm randomly selects a move and accepts it if it
leads to an improvement, regardless of whether it is the best move. Simulated
annealing is a probabilistic variation of Hill Climbing that allows the algorithm
to occasionally accept worse moves in order to avoid getting stuck in local
maxima.
To put it in other words, in the case of hill climbing technique we picked any state as a
successor which was closer to the goal than the current state whereas, in Steepest-
Ascent Hill Climbing algorithm, we choose the best successor among all possible
successors and then update the current state.
2. If it is goal state Then Quit. Otherwise make the current state this initial state
and proceed;
Advertisements
REPORT THIS AD
For each block that has the correct support structure (i.e. ” the complete structure
underneath it is exactly as it should be)t he heuristic function for this example, add one
point for every block in the support structure.
For each block that has an incorrect support structure, subtract one point for every
block in the existing support structure.
Using this function, the goal state has the score 28 (1 for B, 2 for C, etc,). The initial
state has the score -28. Moving A to the table yields a state with a score of -21 since A
no longer has seven wrong blocks under it. The three states that can be produced next
now have the following scores: (a) -28, (b) -16, and (c) -15. This time, steepest-ascent
hill climbing will choose move (c), which is the correct one.
Both the basic and this method of hill climbing may fail to find a solution by reaching
a state from which no subsequent improvement can be made and this state is not the
solution. Let’s look at these states and some solutions for them:
Local maximum state is a state which is better than its neighbors but is not better than
states faraway.
Ridge is an area in the search space which is higher than surrounding states, but it
cannot be reached in a single move.
1. We can backtrack to one of the previous states and explore other directions
2. We can skip few states and make a jump in new directions
3. We can explore several directions to figure out the correct path.
Even though hill climbing technique is much better than exhaustive search, it’s still
not optimal in large problem spaces.
We can always encode global information into heuristic functions to make smarter
decisions, but then computational complexity will be much higher than it was earlier.
8. What is hidden Markov model? Explain?
The basic idea behind an HMM is that the hidden states generate the observations, and
the observed data is used to estimate the hidden state sequence. This is often referred
to as the forward-backwards algorithm.
Now, we will explore some of the key applications of HMMs, including speech
recognition, natural language processing, bioinformatics, and finance.
Speech Recognition
One of the most well-known applications of HMMs is speech recognition. In
this field, HMMs are used to model the different sounds and phones that
makeup speech. The hidden states, in this case, correspond to the different
sounds or phones, and the observations are the acoustic signals that are
generated by the speech. The goal is to estimate the hidden state sequence,
which corresponds to the transcription of the speech, based on the observed
acoustic signals. HMMs are particularly well-suited for speech recognition
because they can effectively capture the underlying structure of the speech, even
when the data is noisy or incomplete. In speech recognition systems, the HMMs
are usually trained on large datasets of speech signals, and the estimated
parameters of the HMMs are used to transcribe speech in real time.
Natural Language Processing
Another important application of HMMs is natural language processing. In this
field, HMMs are used for tasks such as part-of-speech tagging, named entity
recognition, and text classification. In these applications, the hidden states are
typically associated with the underlying grammar or structure of the text, while
the observations are the words in the text. The goal is to estimate the hidden
state sequence, which corresponds to the structure or meaning of the text, based
on the observed words. HMMs are useful in natural language processing
because they can effectively capture the underlying structure of the text, even
when the data is noisy or ambiguous. In natural language processing systems,
the HMMs are usually trained on large datasets of text, and the estimated
parameters of the HMMs are used to perform various NLP tasks, such as text
classification, part-of-speech tagging, and named entity recognition.
Bioinformatics
HMMs are also widely used in bioinformatics, where they are used to model
sequences of DNA, RNA, and proteins. The hidden states, in this case,
correspond to the different types of residues, while the observations are the
sequences of residues. The goal is to estimate the hidden state sequence, which
corresponds to the underlying structure of the molecule, based on the observed
sequences of residues. HMMs are useful in bioinformatics because they can
effectively capture the underlying structure of the molecule, even when the data
is noisy or incomplete. In bioinformatics systems, the HMMs are usually trained
on large datasets of molecular sequences, and the estimated parameters of the
HMMs are used to predict the structure or function of new molecular sequences.
Finance
Finally, HMMs have also been used in finance, where they are used to model stock
prices, interest rates, and currency exchange rates. In these applications, the hidden
states correspond to different economic states, such as bull and bear markets, while
the observations are the stock prices, interest rates, or exchange rates. The goal is to
estimate the hidden state sequence, which corresponds to the underlying economic
state, based on the observed prices, rates, or exchange rates. HMMs are useful in
finance because they can effectively capture the underlying economic state, even
when the data is noisy or incomplete. In finance systems, the HMMs are usually
trained on large datasets of financial data, and the estimated parameters of the
HMMs are used to make predictions about future market trends or to develop
investment strategies.