The document discusses finite automata and regular expressions. It contains 20 questions related to finite automata, regular expressions, and properties of regular languages. Each question has a short explanation of the solution or approach. The questions cover topics such as minimum number of states in finite automata, equivalence of deterministic and non-deterministic finite automata, regular expressions for given languages, closure properties of regular languages, and regular grammars.
Natural language processing provides a way in which human interacts with computer / machines by means of voice.
"Google Search by voice is the best example " which makes use of natural language processing.
Natural Language Processing in Artificial Intelligence - Codeup #5 - PayU Artivatic.ai
This is workshop presentation for usages for NLP in Artificial Intelligence.
This is prepared by Artivatic Data Labs.
For more info for the detailed product, visit at www.artivatic.com
Abstract A usage of regular expressions to search text is well known and understood as a useful technique. Regular Expressions are generic representations for a string or a collection of strings. Regular expressions (regexps) are one of the most useful tools in computer science. NLP, as an area of computer science, has greatly benefitted from regexps: they are used in phonology, morphology, text analysis, information extraction, & speech recognition. This paper helps a reader to give a general review on usage of regular expressions illustrated with examples from natural language processing. In addition, there is a discussion on different approaches of regular expression in NLP. Keywords— Regular Expression, Natural Language Processing, Tokenization, Longest common subsequence alignment, POS tagging
----------------------------
This document discusses cognitive computing systems and their key components and processes. It defines cognitive computing as simulating human thought processes using computer models. A cognitive system consists of contextual insights from models, hypothesis generation, and continuous self-learning. Key features include learning from data without reprogramming, generating and evaluating hypotheses based on current knowledge, and discovering patterns in data with or without guidance. The document outlines the high-level process flow of a cognitive system including ingestion, categorization, matching, exploration and dialog loops. It describes the elements of a cognitive system such as iterative hypothesis generation and evaluation, data access and management services, corpora/ontologies, analytics services, and presentation services. Automated hypothesis generation from text data is discussed
Information retrieval 10 tf idf and bag of wordsVaibhav Khanna
The bag-of-words model is a simplifying representation used in natural language processing and information retrieval (IR). In this model, a text (such as a sentence or a document) is represented as the bag (multiset) of its words, disregarding grammar and even word order but keeping multiplicity.
Natural language processing PPT presentationSai Mohith
A ppt presentation for technicial seminar on the topic Natural Language processing
References used:
Slideshare.net
wikipedia.org NLP
Stanford NLP website
Natural Language processing Parts of speech tagging, its classes, and how to ...Rajnish Raj
Part of speech (POS) tagging is the process of assigning a part of speech tag like noun, verb, adjective to each word in a sentence. It involves determining the most likely tag sequence given the probabilities of tags occurring before or after other tags, and words occurring with certain tags. POS tagging is the first step in many NLP applications and helps determine the grammatical role of words. It involves calculating bigram and lexical probabilities from annotated corpora to find the tag sequence with the highest joint probability.
Natural language processing provides a way in which human interacts with computer / machines by means of voice.
"Google Search by voice is the best example " which makes use of natural language processing.
Natural Language Processing in Artificial Intelligence - Codeup #5 - PayU Artivatic.ai
This is workshop presentation for usages for NLP in Artificial Intelligence.
This is prepared by Artivatic Data Labs.
For more info for the detailed product, visit at www.artivatic.com
Abstract A usage of regular expressions to search text is well known and understood as a useful technique. Regular Expressions are generic representations for a string or a collection of strings. Regular expressions (regexps) are one of the most useful tools in computer science. NLP, as an area of computer science, has greatly benefitted from regexps: they are used in phonology, morphology, text analysis, information extraction, & speech recognition. This paper helps a reader to give a general review on usage of regular expressions illustrated with examples from natural language processing. In addition, there is a discussion on different approaches of regular expression in NLP. Keywords— Regular Expression, Natural Language Processing, Tokenization, Longest common subsequence alignment, POS tagging
----------------------------
This document discusses cognitive computing systems and their key components and processes. It defines cognitive computing as simulating human thought processes using computer models. A cognitive system consists of contextual insights from models, hypothesis generation, and continuous self-learning. Key features include learning from data without reprogramming, generating and evaluating hypotheses based on current knowledge, and discovering patterns in data with or without guidance. The document outlines the high-level process flow of a cognitive system including ingestion, categorization, matching, exploration and dialog loops. It describes the elements of a cognitive system such as iterative hypothesis generation and evaluation, data access and management services, corpora/ontologies, analytics services, and presentation services. Automated hypothesis generation from text data is discussed
Information retrieval 10 tf idf and bag of wordsVaibhav Khanna
The bag-of-words model is a simplifying representation used in natural language processing and information retrieval (IR). In this model, a text (such as a sentence or a document) is represented as the bag (multiset) of its words, disregarding grammar and even word order but keeping multiplicity.
Natural language processing PPT presentationSai Mohith
A ppt presentation for technicial seminar on the topic Natural Language processing
References used:
Slideshare.net
wikipedia.org NLP
Stanford NLP website
Natural Language processing Parts of speech tagging, its classes, and how to ...Rajnish Raj
Part of speech (POS) tagging is the process of assigning a part of speech tag like noun, verb, adjective to each word in a sentence. It involves determining the most likely tag sequence given the probabilities of tags occurring before or after other tags, and words occurring with certain tags. POS tagging is the first step in many NLP applications and helps determine the grammatical role of words. It involves calculating bigram and lexical probabilities from annotated corpora to find the tag sequence with the highest joint probability.
Adnan: Introduction to Natural Language Processing Mustafa Jarrar
This document provides an introduction to natural language processing (NLP). It discusses key topics in NLP including languages and intelligence, the goals of NLP, applications of NLP, and general themes in NLP like ambiguity in language and statistical vs rule-based methods. The document also previews specific NLP techniques that will be covered like part-of-speech tagging, parsing, grammar induction, and finite state analysis. Empirical approaches to NLP are discussed including analyzing word frequencies in corpora and addressing data sparseness issues.
Here are two approaches to sampling from a convex body:
1. Rejection sampling: Repeatedly sample from the entire space and accept the sample if it falls within the convex body.
2. Ball walk:
- Start with a random point inside the body.
- Uniformly sample a direction and step size within a ball centered at the current point.
- If the new point is still within the body, move there. Otherwise stay put.
- Repeat many times to converge to the desired distribution over the body.
These approaches allow sampling from complex convex bodies like the version space in an efficient manner, enabling the implementation of query by committee active learning.
The document provides an introduction to natural language processing (NLP), discussing key related areas and various NLP tasks involving syntactic, semantic, and pragmatic analysis of language. It notes that NLP systems aim to allow computers to communicate with humans using everyday language and that ambiguity is ubiquitous in natural language, requiring disambiguation. Both manual and automatic learning approaches to developing NLP systems are examined.
This document provides an overview of the CS4109 Computer System Architecture course taught by Prof. K.Sridhar Patnaik at BIT Mesra, Ranchi. The course objectives are to learn how computers work, analyze performance, and understand computer design and modern processor issues. The knowledge is useful for tasks like designing computers, improving software performance, and providing embedded solutions. Key topics covered include performance, instruction set architecture, arithmetic logic units, processor construction, pipelining, memory systems, and input/output. The document also discusses computer organization versus architecture, Turing machines as a model of computation, and the Church-Turing thesis.
Los antivirus han evolucionado desde programas simples en la década de 1980 hasta programas avanzados capaces de detectar y eliminar virus informáticos, así como otros tipos de malware como spyware y rootkit. Es importante actualizar periódicamente el antivirus para que pueda detectar los virus más recientes y nunca desactivarlo, ya que deja la computadora vulnerable a ataques.
Natural Language Processing(NLP) is a subset Of AI.It is the ability of a computer program to understand human language as it is spoken.
Contents
What Is NLP?
Why NLP?
Levels In NLP
Components Of NLP
Approaches To NLP
Stages In NLP
NLTK
Setting Up NLP Environment
Some Applications Of NLP
Natural language processing (NLP) analyzes and represents natural language text or speech at linguistic levels to achieve human-like language processing for applications. NLP was influenced by Turing's 1950 paper on machine intelligence and involved early systems like SHRDLU in the 1960s. NLP understands, generates, and integrates natural language through techniques like morphological, syntactic, semantic and discourse analysis to benefit domains like search, translation, sentiment analysis, social media and more.
The document discusses using deep learning approaches for handwritten Bangla digit recognition. It proposes using convolutional neural networks (CNNs) and deep belief networks (DBNs) with dropout and different filters. It finds that a CNN using Gabor features and dropout achieved the best accuracy compared to other techniques. The research is continuing to develop more advanced neural networks combining state preserving extreme learning machines to recognize Bangla numerals and characters.
Language translation with Deep Learning (RNN) with TensorFlowS N
This document provides an overview of a meetup on language translation with deep learning using TensorFlow on FloydHub. It will cover the language translation challenge, introducing key concepts like deep learning, RNNs, NLP, TensorFlow and FloydHub. It will then describe the solution approach to the translation task, including a demo and code walkthrough. Potential next steps and references for further learning are also mentioned.
This document summarizes a research paper on Bangla handwritten digit recognition using a convolutional neural network called Bayanno-Net. The paper proposes a CNN model with three convolutional layers, three max pooling layers, and four dropout layers to classify Bangla handwritten digits. The model achieves 96.5% accuracy on the test set. Future work discussed includes expanding the model to recognize Bangla handwriting and street signs in real-time.
This document provides an overview of natural language processing (NLP). It discusses how NLP analyzes human language input to build computational models of language. The key components of NLP are natural language understanding and natural language generation. Challenges in NLP include ambiguity, context dependence, and the creative nature of language. The document also outlines common NLP techniques like keyword analysis and syntactic parsing, as well as formal grammars and parsing approaches.
We propose a new design for large-scale multimedia content protection systems.
The proposed system can be used to protect different multimedia content types, including 2-D videos, 3-D videos, images, audio clips, songs, and music clips.
The system can be deployed on private and/or public clouds. Our system has two novel components: (i) method to create signatures of 3-D videos, and (ii) distributed matching engine for multimedia objects.
Intro to Auto Speech Recognition -- How ML Learns Speech-to-TextYoshiyuki Igarashi
Automatic speech recognition (ASR) is the technology that converts speech to written text. There are two main approaches: static systems that use acoustic, pronunciation, and language models sequentially; and end-to-end neural networks that use deep neural networks for feature extraction, acoustic modeling, and language modeling. Challenges for ASR systems include noise, variations in accents and ages, transferring learning across dialects, and operating locally on devices without internet.
Published on 11 may, 2018
Chainer is a deep learning framework which is flexible, intuitive, and powerful.
This slide introduces some unique features of Chainer and its additional packages such as ChainerMN (distributed learning), ChainerCV (computer vision), ChainerRL (reinforcement learning), Chainer Chemistry (biology and chemistry), and ChainerUI (visualization).
The document discusses challenges in training deep neural networks and solutions to those challenges. Training deep neural networks with many layers and parameters can be slow and prone to overfitting. A key challenge is the vanishing gradient problem, where the gradients shrink exponentially small as they propagate through many layers, making earlier layers very slow to train. Solutions include using initialization techniques like He initialization and activation functions like ReLU and leaky ReLU that do not saturate, preventing gradients from vanishing. Later improvements include the ELU activation function.
Natural Language Processing (NLP) - IntroductionAritra Mukherjee
This presentation provides a beginner-friendly introduction towards Natural Language Processing in a way that arouses interest in the field. I have made the effort to include as many easy to understand examples as possible.
This document provides an overview of Latent Dirichlet Allocation (LDA), a generative probabilistic model for collections of discrete data such as text corpora. It defines key terminology for LDA including documents, words, topics, and distributions. The document then explains LDA's graphical model and generative process, which represents documents as mixtures over latent topics and generates words probabilistically from topics. Variational inference is introduced as an approach for approximating the intractable posterior distribution over topics and learning model parameters.
The document discusses CPU architecture and microcontroller components. It describes how the CPU is divided into three main parts: the datapath, control unit, and instruction set. The datapath performs data processing, the control unit uses instructions to direct the datapath, and the instruction set is the programmer interface. It then focuses on explaining the datapath in more detail, including the arithmetic logic unit, register file, and their functions. Finally, it provides an overview of different microcontroller families that can be selected based on application requirements like I/O needs, memory, speed, and more.
Neural Networks with Focus on Language ModelingAdel Rahimi
Neural networks can be used for language modeling by assigning probabilities to sequences of words. Language models are evaluated based on how well they can predict upcoming words. Recurrent neural networks like LSTMs are commonly used for language modeling and have achieved better performance than traditional n-gram models, with state-of-the-art LSTMs obtaining a perplexity score of 23 compared to 41 for regular RNNs. Convolutional networks can also be applied to language modeling by treating word embeddings as inputs.
This document discusses regular expressions and finite automata. It begins by defining regular expressions, which are sequences of characters that define search patterns. It then discusses how regular expressions are used to define formal languages and how finite automata can be constructed to recognize these languages. Specific topics covered include the definition of regular expressions, building regular expressions, constructing finite automata from regular expressions, applying Arden's theorem to find regular expressions from finite automata, and proving languages are non-regular using the pumping lemma. Examples are provided to demonstrate how to construct finite automata from regular expressions and apply these concepts.
Adnan: Introduction to Natural Language Processing Mustafa Jarrar
This document provides an introduction to natural language processing (NLP). It discusses key topics in NLP including languages and intelligence, the goals of NLP, applications of NLP, and general themes in NLP like ambiguity in language and statistical vs rule-based methods. The document also previews specific NLP techniques that will be covered like part-of-speech tagging, parsing, grammar induction, and finite state analysis. Empirical approaches to NLP are discussed including analyzing word frequencies in corpora and addressing data sparseness issues.
Here are two approaches to sampling from a convex body:
1. Rejection sampling: Repeatedly sample from the entire space and accept the sample if it falls within the convex body.
2. Ball walk:
- Start with a random point inside the body.
- Uniformly sample a direction and step size within a ball centered at the current point.
- If the new point is still within the body, move there. Otherwise stay put.
- Repeat many times to converge to the desired distribution over the body.
These approaches allow sampling from complex convex bodies like the version space in an efficient manner, enabling the implementation of query by committee active learning.
The document provides an introduction to natural language processing (NLP), discussing key related areas and various NLP tasks involving syntactic, semantic, and pragmatic analysis of language. It notes that NLP systems aim to allow computers to communicate with humans using everyday language and that ambiguity is ubiquitous in natural language, requiring disambiguation. Both manual and automatic learning approaches to developing NLP systems are examined.
This document provides an overview of the CS4109 Computer System Architecture course taught by Prof. K.Sridhar Patnaik at BIT Mesra, Ranchi. The course objectives are to learn how computers work, analyze performance, and understand computer design and modern processor issues. The knowledge is useful for tasks like designing computers, improving software performance, and providing embedded solutions. Key topics covered include performance, instruction set architecture, arithmetic logic units, processor construction, pipelining, memory systems, and input/output. The document also discusses computer organization versus architecture, Turing machines as a model of computation, and the Church-Turing thesis.
Los antivirus han evolucionado desde programas simples en la década de 1980 hasta programas avanzados capaces de detectar y eliminar virus informáticos, así como otros tipos de malware como spyware y rootkit. Es importante actualizar periódicamente el antivirus para que pueda detectar los virus más recientes y nunca desactivarlo, ya que deja la computadora vulnerable a ataques.
Natural Language Processing(NLP) is a subset Of AI.It is the ability of a computer program to understand human language as it is spoken.
Contents
What Is NLP?
Why NLP?
Levels In NLP
Components Of NLP
Approaches To NLP
Stages In NLP
NLTK
Setting Up NLP Environment
Some Applications Of NLP
Natural language processing (NLP) analyzes and represents natural language text or speech at linguistic levels to achieve human-like language processing for applications. NLP was influenced by Turing's 1950 paper on machine intelligence and involved early systems like SHRDLU in the 1960s. NLP understands, generates, and integrates natural language through techniques like morphological, syntactic, semantic and discourse analysis to benefit domains like search, translation, sentiment analysis, social media and more.
The document discusses using deep learning approaches for handwritten Bangla digit recognition. It proposes using convolutional neural networks (CNNs) and deep belief networks (DBNs) with dropout and different filters. It finds that a CNN using Gabor features and dropout achieved the best accuracy compared to other techniques. The research is continuing to develop more advanced neural networks combining state preserving extreme learning machines to recognize Bangla numerals and characters.
Language translation with Deep Learning (RNN) with TensorFlowS N
This document provides an overview of a meetup on language translation with deep learning using TensorFlow on FloydHub. It will cover the language translation challenge, introducing key concepts like deep learning, RNNs, NLP, TensorFlow and FloydHub. It will then describe the solution approach to the translation task, including a demo and code walkthrough. Potential next steps and references for further learning are also mentioned.
This document summarizes a research paper on Bangla handwritten digit recognition using a convolutional neural network called Bayanno-Net. The paper proposes a CNN model with three convolutional layers, three max pooling layers, and four dropout layers to classify Bangla handwritten digits. The model achieves 96.5% accuracy on the test set. Future work discussed includes expanding the model to recognize Bangla handwriting and street signs in real-time.
This document provides an overview of natural language processing (NLP). It discusses how NLP analyzes human language input to build computational models of language. The key components of NLP are natural language understanding and natural language generation. Challenges in NLP include ambiguity, context dependence, and the creative nature of language. The document also outlines common NLP techniques like keyword analysis and syntactic parsing, as well as formal grammars and parsing approaches.
We propose a new design for large-scale multimedia content protection systems.
The proposed system can be used to protect different multimedia content types, including 2-D videos, 3-D videos, images, audio clips, songs, and music clips.
The system can be deployed on private and/or public clouds. Our system has two novel components: (i) method to create signatures of 3-D videos, and (ii) distributed matching engine for multimedia objects.
Intro to Auto Speech Recognition -- How ML Learns Speech-to-TextYoshiyuki Igarashi
Automatic speech recognition (ASR) is the technology that converts speech to written text. There are two main approaches: static systems that use acoustic, pronunciation, and language models sequentially; and end-to-end neural networks that use deep neural networks for feature extraction, acoustic modeling, and language modeling. Challenges for ASR systems include noise, variations in accents and ages, transferring learning across dialects, and operating locally on devices without internet.
Published on 11 may, 2018
Chainer is a deep learning framework which is flexible, intuitive, and powerful.
This slide introduces some unique features of Chainer and its additional packages such as ChainerMN (distributed learning), ChainerCV (computer vision), ChainerRL (reinforcement learning), Chainer Chemistry (biology and chemistry), and ChainerUI (visualization).
The document discusses challenges in training deep neural networks and solutions to those challenges. Training deep neural networks with many layers and parameters can be slow and prone to overfitting. A key challenge is the vanishing gradient problem, where the gradients shrink exponentially small as they propagate through many layers, making earlier layers very slow to train. Solutions include using initialization techniques like He initialization and activation functions like ReLU and leaky ReLU that do not saturate, preventing gradients from vanishing. Later improvements include the ELU activation function.
Natural Language Processing (NLP) - IntroductionAritra Mukherjee
This presentation provides a beginner-friendly introduction towards Natural Language Processing in a way that arouses interest in the field. I have made the effort to include as many easy to understand examples as possible.
This document provides an overview of Latent Dirichlet Allocation (LDA), a generative probabilistic model for collections of discrete data such as text corpora. It defines key terminology for LDA including documents, words, topics, and distributions. The document then explains LDA's graphical model and generative process, which represents documents as mixtures over latent topics and generates words probabilistically from topics. Variational inference is introduced as an approach for approximating the intractable posterior distribution over topics and learning model parameters.
The document discusses CPU architecture and microcontroller components. It describes how the CPU is divided into three main parts: the datapath, control unit, and instruction set. The datapath performs data processing, the control unit uses instructions to direct the datapath, and the instruction set is the programmer interface. It then focuses on explaining the datapath in more detail, including the arithmetic logic unit, register file, and their functions. Finally, it provides an overview of different microcontroller families that can be selected based on application requirements like I/O needs, memory, speed, and more.
Neural Networks with Focus on Language ModelingAdel Rahimi
Neural networks can be used for language modeling by assigning probabilities to sequences of words. Language models are evaluated based on how well they can predict upcoming words. Recurrent neural networks like LSTMs are commonly used for language modeling and have achieved better performance than traditional n-gram models, with state-of-the-art LSTMs obtaining a perplexity score of 23 compared to 41 for regular RNNs. Convolutional networks can also be applied to language modeling by treating word embeddings as inputs.
This document discusses regular expressions and finite automata. It begins by defining regular expressions, which are sequences of characters that define search patterns. It then discusses how regular expressions are used to define formal languages and how finite automata can be constructed to recognize these languages. Specific topics covered include the definition of regular expressions, building regular expressions, constructing finite automata from regular expressions, applying Arden's theorem to find regular expressions from finite automata, and proving languages are non-regular using the pumping lemma. Examples are provided to demonstrate how to construct finite automata from regular expressions and apply these concepts.
Regular languages can be described using regular grammars, regular expressions, or finite automata. A regular grammar contains productions of the form A->aB or A->a where A and B are nonterminals and a is a terminal. A language is regular if it can be generated by a regular grammar. Regular expressions describe languages using operators like concatenation, union, and Kleene star. Finite automata are machines that accept or reject strings using a finite number of states. The three models are equivalent in that they can generate the same regular languages.
This document contains a 45 item multiple choice test on additional mathematics. It provides instructions for taking the test, including that it has 45 items to be completed in 1 hour and 30 minutes. It also lists some formulae provided on page 2. Each item has 4 answer choices labeled A, B, C, or D. Students are to record their answers on an answer sheet by shading the corresponding space for the choice they believe is best. A sample item is worked through as an example. Calculators may be used.
End semexam | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurVivekananda Samiti
This document contains the details of an end-semester examination for an undergraduate course on Theory of Computation. The exam consists of 10 multiple choice and justification questions (Part 1) and 2 longer proof questions (Parts 2 and 3). Part 1 asks students to determine whether statements about formal language classes are true or false and provide justifications. Part 2 asks students to prove that a particular language defined using pushdown automata is not context-free. Part 3 asks students to design an algorithm to show that a language involving matching strings is recursive.
This document discusses pushdown automata (PDA) and provides examples. It can be summarized as follows:
(1) A PDA is like a finite automaton but with an additional stack that allows it to remember an unlimited amount of information. This makes PDAs more powerful than finite automata.
(2) The document defines PDA formally and explains their transition function and how it incorporates stack operations. Examples are provided to recognize languages like 0^n 1^n that require unlimited memory.
(3) Sample computations are shown step-by-step to demonstrate how PDAs process input strings and manipulate their stack according to the transition function. Negative examples are also included to show strings that would
This document discusses pushdown automata (PDA) and provides examples. It can be summarized as:
(1) A PDA is like a finite automaton but with an additional stack that allows it to remember an infinite amount of information. Transitions can push symbols onto or pop symbols off the stack.
(2) Examples show how a PDA can recognize languages like {0^n 1^n} that require counting, which finite automata cannot do. The stack is used to match 0s and 1s.
(3) The formal definition of a PDA specifies its states, alphabet, stack alphabet, initial/accepting configurations, and transition function defining stack operations.
The document discusses pushdown automata (PDA) and provides examples of how PDA can be used to recognize certain languages. It begins by explaining that PDA extend finite state automata by adding a stack, allowing them to "remember" an infinite amount of information. Several examples are then provided to illustrate how PDA work, including languages of balanced parentheses, strings with equal numbers of 0s and 1s, and strings of the form wcwr. The formal definition of a PDA is given, and transition diagrams are used to visualize example computations.
International Journal of Mathematics and Statistics Invention (IJMSI) inventionjournals
International Journal of Mathematics and Statistics Invention (IJMSI) is an international journal intended for professionals and researchers in all fields of computer science and electronics. IJMSI publishes research articles and reviews within the whole field Mathematics and Statistics, new teaching methods, assessment, validation and the impact of new technologies and it will continue to provide information on the latest trends and developments in this ever-expanding subject. The publications of papers are selected through double peer reviewed to ensure originality, relevance, and readability. The articles published in our journal can be accessed online.
The document discusses several topics related to regular languages and regular expressions:
1. It proves that the language L={0n2/n is an integer, n>1} is not regular by showing that the length of strings in L exceeds the number of states in any finite automaton recognizing L.
2. It defines regular expressions and describes their syntax and how they are used to represent regular languages.
3. It provides a regular expression (01)*+(10)*+0(10)*+1(01)* for the language of strings with alternating 0s and 1s.
4. It proves several example languages such as {02n|n>1} are not regular by using
- An NFA can be converted to an equivalent DFA using the subset construction. This involves constructing states of the DFA that correspond to subsets of states of the NFA.
- The subset construction results in an exponential blow-up in the number of states between the NFA and DFA. There is an NFA with n+1 states that requires a DFA with at least 2^n states.
- An epsilon-NFA (ε-NFA) allows epsilon transitions and can be converted to an equivalent DFA using a similar subset construction approach.
The pattern of question paper in the subject Mathematics has been changed in CBSE,India.I am uploading the paper with marking scheme so that students will be benefitted-Pratima Nayak,KVS
This document discusses regular expressions and their properties. It begins by defining regular expressions and describing how they can be used to represent languages. It then discusses the languages associated with regular expressions and how to determine equivalence between regular expressions. The document also covers properties of regular expressions like precedence, algebraic laws, and identities. It provides examples of constructing finite automata from regular expressions and constructing regular expressions from finite automata. Finally, it discusses the pumping lemma and closure properties of regular languages.
1. Regular expressions are used to compactly represent sets of strings and are the basis for specifying patterns in lexical analysis.
2. Finite state automata are constructed to recognize strings belonging to the language defined by a regular expression. For every regular expression there is a corresponding finite state automaton.
3. The input string is checked for membership in the regular language by tracing a path through the automaton corresponding to the regular expression. If a complete path is found that reads the input string, it is accepted.
The document discusses regular expressions and regular languages. It provides examples of regular expressions over alphabets, describes how to build regular expressions using operators like concatenation and Kleene star, and how regular expressions correspond to finite automata. It also discusses properties of regular languages and how to use the pumping lemma to prove that a language is not regular.
The document provides information about a course on the theory of automata. It includes details such as the course title, prerequisites, duration, lectures, laboratories, and topics to be covered. The topics include finite automata, deterministic finite automata, non-deterministic finite automata, regular expressions, properties of regular languages, context-free grammars, pushdown automata, and Turing machines. It also lists reference books and textbooks, and the marking scheme for the course.
This document provides information about a course on the theory of automata, including:
- The course title is Theory of Computer Science [Automata] and is intended for students pursuing a BCS degree in their fifth semester.
- Key topics that will be covered include finite automata, regular expressions, context-free grammars, pushdown automata, and Turing machines.
- Reference textbooks and materials are listed to support student learning in the course over 18 weeks of lectures and labs.
This document provides information about a GATE CS test paper from 2003 and discusses joining an All India Mock GATE Classroom Test Series conducted by GATE Forum. It includes sample questions from the 2003 GATE CS paper, covering topics like algorithms, data structures, automata theory, databases, computer networks, operating systems and more. 30 questions have one mark each and 60 questions have two marks each. The document encourages visiting the GATE Forum website for more details on joining their test series to help prepare for GATE.
This document provides mathematical preliminaries for automata, including:
- Sets, functions, relations, graphs, and proof techniques like induction and proof by contradiction.
- It defines sets, set operations, functions, relations, graphs, trees, and binary trees.
- It also covers topics like equivalence relations, equivalence classes, Cartesian products, and power sets.
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...PECB
Denis is a dynamic and results-driven Chief Information Officer (CIO) with a distinguished career spanning information systems analysis and technical project management. With a proven track record of spearheading the design and delivery of cutting-edge Information Management solutions, he has consistently elevated business operations, streamlined reporting functions, and maximized process efficiency.
Certified as an ISO/IEC 27001: Information Security Management Systems (ISMS) Lead Implementer, Data Protection Officer, and Cyber Risks Analyst, Denis brings a heightened focus on data security, privacy, and cyber resilience to every endeavor.
His expertise extends across a diverse spectrum of reporting, database, and web development applications, underpinned by an exceptional grasp of data storage and virtualization technologies. His proficiency in application testing, database administration, and data cleansing ensures seamless execution of complex projects.
What sets Denis apart is his comprehensive understanding of Business and Systems Analysis technologies, honed through involvement in all phases of the Software Development Lifecycle (SDLC). From meticulous requirements gathering to precise analysis, innovative design, rigorous development, thorough testing, and successful implementation, he has consistently delivered exceptional results.
Throughout his career, he has taken on multifaceted roles, from leading technical project management teams to owning solutions that drive operational excellence. His conscientious and proactive approach is unwavering, whether he is working independently or collaboratively within a team. His ability to connect with colleagues on a personal level underscores his commitment to fostering a harmonious and productive workplace environment.
Date: May 29, 2024
Tags: Information Security, ISO/IEC 27001, ISO/IEC 42001, Artificial Intelligence, GDPR
-------------------------------------------------------------------------------
Find out more about ISO training and certification services
Training: ISO/IEC 27001 Information Security Management System - EN | PECB
ISO/IEC 42001 Artificial Intelligence Management System - EN | PECB
General Data Protection Regulation (GDPR) - Training Courses - EN | PECB
Webinars: https://pecb.com/webinars
Article: https://pecb.com/article
-------------------------------------------------------------------------------
For more information about PECB:
Website: https://pecb.com/
LinkedIn: https://www.linkedin.com/company/pecb/
Facebook: https://www.facebook.com/PECBInternational/
Slideshare: http://www.slideshare.net/PECBCERTIFICATION
Strategies for Effective Upskilling is a presentation by Chinwendu Peace in a Your Skill Boost Masterclass organisation by the Excellence Foundation for South Sudan on 08th and 09th June 2024 from 1 PM to 3 PM on each day.
Walmart Business+ and Spark Good for Nonprofits.pdfTechSoup
"Learn about all the ways Walmart supports nonprofit organizations.
You will hear from Liz Willett, the Head of Nonprofits, and hear about what Walmart is doing to help nonprofits, including Walmart Business and Spark Good. Walmart Business+ is a new offer for nonprofits that offers discounts and also streamlines nonprofits order and expense tracking, saving time and money.
The webinar may also give some examples on how nonprofits can best leverage Walmart Business+.
The event will cover the following::
Walmart Business + (https://business.walmart.com/plus) is a new shopping experience for nonprofits, schools, and local business customers that connects an exclusive online shopping experience to stores. Benefits include free delivery and shipping, a 'Spend Analytics” feature, special discounts, deals and tax-exempt shopping.
Special TechSoup offer for a free 180 days membership, and up to $150 in discounts on eligible orders.
Spark Good (walmart.com/sparkgood) is a charitable platform that enables nonprofits to receive donations directly from customers and associates.
Answers about how you can do more with Walmart!"
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumMJDuyan
(𝐓𝐋𝐄 𝟏𝟎𝟎) (𝐋𝐞𝐬𝐬𝐨𝐧 𝟏)-𝐏𝐫𝐞𝐥𝐢𝐦𝐬
𝐃𝐢𝐬𝐜𝐮𝐬𝐬 𝐭𝐡𝐞 𝐄𝐏𝐏 𝐂𝐮𝐫𝐫𝐢𝐜𝐮𝐥𝐮𝐦 𝐢𝐧 𝐭𝐡𝐞 𝐏𝐡𝐢𝐥𝐢𝐩𝐩𝐢𝐧𝐞𝐬:
- Understand the goals and objectives of the Edukasyong Pantahanan at Pangkabuhayan (EPP) curriculum, recognizing its importance in fostering practical life skills and values among students. Students will also be able to identify the key components and subjects covered, such as agriculture, home economics, industrial arts, and information and communication technology.
𝐄𝐱𝐩𝐥𝐚𝐢𝐧 𝐭𝐡𝐞 𝐍𝐚𝐭𝐮𝐫𝐞 𝐚𝐧𝐝 𝐒𝐜𝐨𝐩𝐞 𝐨𝐟 𝐚𝐧 𝐄𝐧𝐭𝐫𝐞𝐩𝐫𝐞𝐧𝐞𝐮𝐫:
-Define entrepreneurship, distinguishing it from general business activities by emphasizing its focus on innovation, risk-taking, and value creation. Students will describe the characteristics and traits of successful entrepreneurs, including their roles and responsibilities, and discuss the broader economic and social impacts of entrepreneurial activities on both local and global scales.
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxEduSkills OECD
Iván Bornacelly, Policy Analyst at the OECD Centre for Skills, OECD, presents at the webinar 'Tackling job market gaps with a skills-first approach' on 12 June 2024
How to Make a Field Mandatory in Odoo 17Celine George
In Odoo, making a field required can be done through both Python code and XML views. When you set the required attribute to True in Python code, it makes the field required across all views where it's used. Conversely, when you set the required attribute in XML views, it makes the field required only in the context of that particular view.
Main Java[All of the Base Concepts}.docxadhitya5119
This is part 1 of my Java Learning Journey. This Contains Custom methods, classes, constructors, packages, multithreading , try- catch block, finally block and more.
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Netautomata1
1. Finite Automata
1.(Q35)Consider the regular expression (a+b)(a+b)…(a+b) (n-times). The minimum
number of states in finite automation that recognizes the language represented by this
regular expression contains: [June 2012-Paper-III]
(A)n states (B) n+1 states (C) n+2 states (D) 2n
states
Solution
a,b a,b a,b a,b a,b
……….
2.(Q44)Let L be a set accepted by a non deterministic finite automation. The number of
States in non-deterministic finite automation is |Q|. The maximum The number of
States in equivalent finite automation that accepts L is: [Dec’ 2012-Paper-II]
(A) |Q| (B)2 |Q| (C) 2|Q|
-1 (D) 2|Q|
3.(Q47) The minimum number of states of the non-deterministic finite automation which
accepts the language {a b a bn
| n≥0} U {a b an
| n≥0} is: [Dec’ 2012-Paper-III]
(A)3 (B) 4 (C) 5 (D) 6
Solution
a b a a,b
.
a b
4.(Q24) Given a Non-deterministic Finite Automation(NFA) with states p and r as initial
and final states respectively and transition table as given below:
a b
p -- q
q r s
r r s
s r s
The minimum number of states required in Deterministic Finite Automation (DFA)
equivalent to NFA is: [June 2013-Paper-II]
(A)5 (B) 4 (C) 3 (D) 2
q
0
q
1
q
2
qn
qn-1
q
0
q
1
q
2
q3
q
2
2. Solution
1. Split the state into two groups final state and non-final state:
a. ∏={(p,q,s),(r)}
2. Again split the group states those having same transition on given input symbol
a. ∏new = {{p},{q,s},{r}}
3. Now, assign single name to group {q,s} as {q}
a. ∏new = {{p},{q},{r}}
4. Now the transition table becomes
b a
b a
b
DFA
Transition table
5.(Q13) The number of states in a minimal deterministic finite automation corresponding
to the language L={an
| n≥4} is: [September 2013-Paper-II]
(A)3 (B) 4 (C) 5 (D) 6
Solution a
a a a a a,
6.(Q19) Minimal deterministic finite automation for the language L={0n
| n≥0 , n≠4 } will
have: [June 2015-Paper-III]
(1) 1 final state among 5 states (2) 4 final state among 5 states
(3) 1 final state among 6 states (4) 5 final states among 6 states
Solution
0
0 0 0 0 , 0
7.(Q21) The transition function for the language L={w | na(w) and nb(w) are both odd} is
given by: [June 2015-Paper-III]
δ(q0,a) = q1 ; δ(q0,b) = q2
δ(q1,a) = q0 ; δ(q1,b) = q3
δ(q2,a) = q3 ; δ(q2,b) = q0
δ(q3,a) = q2 ; δ(q3,b) = q1
a b
p -- q
q r q
r r q
p q r
q
0
q
1
q
2
qn
qn-1
q5
q0
q1
q2 q3
q4
3. The initial and final states of the automata are:
(1) q0 and q0 respectively (2) q0 and q1 respectively.
(3) q0 and q2 respectively (4) q0 and q3 respectively
b
Solution b
a a
a a
b
b
• State q0 recognizes the string ’aa’ as : q0→q1→q1 (‘aa’- not belongs to L)
• State q1 recognizes the string ’abb’ as: q0→q1→q3→q1 (‘abb’- not belongs to L)
• State q2 recognizes the string ’aab’ as: q0→q1→q0→q2 (‘aab’- not belongs to L)
Regular Expression
8. (Q38). Which is not the correct statement? December 2012-Paper-III
(A) The class of regular sets is closed under homomorphisms.
(B) The class of regular sets is not closed under inverse homomorphisms.
(C) The class of regular sets is closed under quotient.
(D) The class of regular sets is closed under substitution.
9. (Q45). Which of the following regular expression identities are true? Dec’ 2012-Paper-III
(A) (r+s)* = r*s*
(B) (r+s)* = r*+s*
(C) (r+s)* = (r*s*)*
(D) r*s* = r*+s*
10. (Q43). The regular expression for the following DFA: June 2012-Paper-III
(A)ab*(b+aa*b)* (B) a*b(b+aa*b)* (C) a*b(b*+aa*b) (D) *b(b*+aa*b)*
q0
q1
q2 q
3
4. Solution
1. q0→q0→q1 : a*b
2. (q1→q1→…. q1 + q1→q0→q1)* : (b* + aa*b)*
3. Finally, concatenate 1 and 2 : a*b(b*+aa*b)*
11. (Q20). Given L1=L(a*baa*) and L2=L(ab*).The regular expression corresponding to
language L3=L1/L2 (right quotient) is given by: ( June 2013-Paper-II)
(A)a*b (B) a*baa* (C) a*ba* (D) None of the above
Solution
L1= L (a *baa *) = {a*ba, a*baa, a*baaa,… },
L2= L(ab*)= a{ λ ,b,b2
,b3
,…}={ a,ab,ab2
,ab3
,.....}
L3=L1/L2 = { x | xy ∈ L1 for some y ∈ L2 }
L3=L1/L2= L( a *baa * )/ L(ab* )
= L(a*baa * ) / a ( because L1 ends with only a∈L2, L1 doesn’t end with
ab,ab2 ,ab3 ,.... ∈L2. )
= {a *ba, a*baa, a*baaa...} / a = {a*b, a*ba, a*baa......}= L( a*ba * }
Correct answer is (c)
12. (Q43). Regular expression for the language L={ w {0,1}* | w has no pair of consecutiveԐ
zeros} is :[ September 2013-Paper-II]
(A)(1+010)* (B) (01+10)* (C) (1+010)*(0+ )ƛ (D) (1+01)*(0+ )ƛ
Solution
1. For (A): Second path followed by second path: 010010
2. For (B): Second path followed by First path: 1001
3. For (C): Second alternative in first part (010) followed by first alternative in second
part(0): 0100
4. Hence, D- is Correct option.
13. (Q44). Consider the following two languages:
L1={an
bl
ak
| n+l+k>5}
L2={an
bl
ak
| n>5,l>3,k<=l}
Which of the following is true?[ September 2013-Paper-II]
5. (A)L1 is regular language and L2 is not regular language
(B) Both L1 and L2 are regular languages.
(C) Both L1 and L2 are not regular languages.
(D)L1 is not regular language and L2 is regular language
Solution
Here is a regular expression for L: aaaaaaa∗ b ∗ a∗ + aaaaabb∗ a∗ + aaaabbb∗a∗ + aaaabaa∗ +
aaabbbb∗a∗ + aaabbaa∗ + aaabaaa∗ + +aabbbbb∗a∗ +aabbbaa∗ +aabbaaa∗+aabaaaa∗ +abbbbbb∗a∗
+abbbbaa∗ +abbbaaa∗+abbaaaa∗+abaaaaa∗ + bbbbbbb∗a∗ + bbbbbaa∗ + bbbbaaa∗ + bbbaaaa∗ +
bbaaaaa∗ + baaaaaa∗
Hence, L1-is regular
DFA for L={an
bl
ak
| n+l+k>5 } a
a a a a a
a b b b b b b
b b b b b b
a a a a a a
a a a a
a
14. (Q28). Given the following statements:
S1: If L is regular language then the language {uv| u L, v LԐ Ԑ R
} is also regular.
S2: If L={wwR
} is regular language.
Which of the following is true? (Dec’ 2013-Paper-II)
(A)S1 is not correct andS2 is not correct.
(B) S1 is not correct andS2 is correct.
(C) S1 is correct and S2 is not correct.
(D)S1 is correct and S2 is correct.
Solution
Consider the language L={a,b,aa,ab,ba,bb,abb,aab,aba,aab,,,..,aaaa,aaab,aabb,abab,abbb,…}
LR
={a,b,aa,ba,ab,bb,bba,baa,aba,baa,,,., aaaa,baaa,bbaa,baba,bbba,…}
1. Let u=’ab’ and v=’ba’
uv=’abba ‘ € L1.L2 →is regular(concatenation)
2. Let w=’abab’ € L
wR
=’baba’€ L
wwR
={ababbaba}€ L is also regular
q
3
q
4
q
5
q
2
q
1
q
0
q9
q1
0
q1
1
q
8
q
7
q1
4
q15
q16
q1
3
q
6
q1
2
q1
7
b
6. 15. (Q10). The regular grammar for the language L=w | na(w) and nb(w) are both even,
w {a , b}*} is given by :(Assume, p, q, r and s are states) [Ԑ June 2014-Paper-II]
(A)p→aq | br | , q→bs | ap r→as | bp, s→ar|bq, p and s are initial and final states.ƛ
(B) p→aq | br, q→bs | ap r→as | bp, s→ar|bq, p and s are initial and final states.
(C)p→aq | br | , q→bs | ap r→as | bp, s→ar|bq, p is both initial and final states.ƛ
(D)p→aq | br, q→bs | ap r→as | bp, s→ar|bq, p is both initial and final states.
Solution
b
b
a a
a a
ƛ b
b
• Since zero occurrences of ‘a’ and ‘b’ is even. Hence, Option (B) and (D) are need not be
consider because these are not supports for ƛ transition.
• For Option (A) State s recognizes the string ’ab’ as : p→q→s (‘ab’- not belongs to L)
• Therefore, Option (C) is correct. State p recognizes empty string as well as even numbers
of a’s and b’s
16(Q15) Let L be any language. Define even(W) as strings obtained by extracting from
W the letters in the even-numbered positions and even(L) = { even(W) | W L}. WeԐ
define another language Chop(L) by removing the two leftmost symbols of every
string in L given by Chop(L) = { W | vW L, with |v| = 2 }. If L is regular languageԐ
then: [June 2014-Paper-III]
(A)even(L) is regular and Chop(L) is not regular.
(B) Both even(L) and Chop(L) are regular.
(C) even(L) is not regular and Chop(L) is regular.
(D) Both even(L) and Chop(L) are not regular.
Solution
even(W) ={W | letters in the even numbered positions of W}
Consider the regular expression r=(a*b*)*
L(r)={ ,a,b,aa,ab,ba,bb,…,aaaa,aaab,aabb,abbb,abaa,abab,baaa,bbaa,bbba,…}Ԑ
q r sp
7. (i) Let W= ‘abaa’
even(W)=’ba’ € L, Therefore even(L) –is regular.
(ii) Let W=’abbababb’ ,Chop(W)=’bababb’ € L, v=’ab’
Chop(L)={W |vW vW L, with |v| = 2 }-is also regularԐ
17. (Q24). Regular expression for the complement of language L={ an
bm
| n≥4, m≤3} is:
[ Dec’ 2014-Paper-III]
(A)(a+b)*ba(a+b)* (B) a*bbbbb*
(C) ( +a+aa+aaa)b*+(a+b)*ba(a+b)*(Key)ƛ (D) None of the above.
Language L defined as: L=aaaaa*(( +b+bb+bbb)ƛ
18. (Q20). The regular expression corresponding to the language L where
L={x {0,1}* | x ends with 1 and does not contain substring 00} is:[Ԑ Jun’2015-Paper-
III]
(1) (1+01)* (10+01) (2) (1+01)*01 (3) (1+01)* (1+01) (4) (10+01)* 01
19(Q16).Assume, L is regular language, Let statements S1 and S2 be defined as :
S1: SQRT(L) = {x | for some y with |y|=|x|2
, xy € L}.
S2: LOG(L) = {x | for some y with |y|=2|x|
, xy € L}.
Which of the following is true? (September 2013-Paper-III)
(A) S1 is correct and S2 is not correct.
(B) Both S1 andS2 are correct.
(C) Both S1 andS2 are not correct.
(D) S1 is not correct and S2 is correct.
Explanation:
r={ an
| n≥0}
L={ ,a,aa,aaa,aaaa,aaaaa,aaaaaa,….}ƛ
SQRT(L)
Let x=aa and y= aaaa
|y| = |x|2
(i.e., |y|=4 and |x|=2.)
LOG(L)
Let x=aaa and y= aaaaaaaa
|y|=2|x|
(i.e., |y|=8 and |x|=3.)
Therefore, Option (B) Both S1 andS2 are correct.
20(Q17). A regular grammar for the language L={ an
bm
|n is even and m is even } is given
by: (September 2013-Paper-III)
(A) S→aSb | S1; S1→bS1a | ƛ
(B) S→aaS | S1; S1→bSb | ƛ
8. (C) S→aSb | S1; S1→S1ab | ƛ
(D) S→aaS | S1; S1→bbS1 | ƛ
Explanation:
Each production of regular grammar should have the following restrictions:
1. Left-hand side of each production should contain only one non-terminal.
2. Right hand side can contain at most one non-terminal symbol which is allowed to
appear as the right most symbol or left most symbol
Therefore, Option (D) S→aaS | S1; S1→bbS1 | ƛ
Context Free Grammar
21(Q39). The following CFG: S→aB | bA, A→a | aS | bAA, B→b | bS | aBB
Generates strings of terminals that have: [June 2012, Paper-III]
(A) odd number of a’s and odd number of b’s
(B) even number of a’s and even number of b’s
(C)equal number of a’s and b’s
(D) not equal number of a’s and b’s
Solution
• Whenever replace/substitute B by corresponding production, it places a single b or abb or
bS makes equal number of a’s and b’s.
• Whenever replace/substitute A by corresponding production, it places a single a or baa or
aS makes equal number of a’s and b’s.
22(Q7) The ‘C’ language is: [December 2012, Paper-II]
(A) Context free language (B) Context sensitive language
(C) Regular language (D) None of the above.
23(Q42) The Grammar ‘G1’
S→ 0S0 | 1S1 | 0 | 1 | ε and the grammar
‘G2’ is
S→ aS | aSb | X, X→Xa | a.
Which is the correct statement? [December 2012, Paper-III]
(A) G1 is ambiguous, G2 is un ambiguous (B) G1 is unambiguous, G2 is ambiguous
(C) Both G1and G2 are ambiguous (D) Both G1and G2 are unambiguous
24(Q21/Q73) Given the production rules of a grammar G1 as
S1→AB |aaB, A→ a | Aa, B→b and the production rules of grammar,
G2 as
9. S2→ a S2 b S2 | b S2 a S2 | ƛ
Which of the following is correct statement? [June 2013, Paper-II/June 2014, Paper-III]
(A) G1 is ambiguous, G2 is not ambiguous (B) G1 is ambiguous and G2 is ambiguous
(C) G1 is not ambiguous, G2 is ambiguous (D) G1 is not ambiguous and G2 is not ambiguous
25(Q75) Given the following two languages:
L1: {an
bn
| n≥1} U {a}
L2: {wcwR
| w € {a, b}* }
Which statement is correct?[June 2014, Paper-III]
(A) Both L1 and L2 are not deterministic.
(B) L1 is not deterministic and L2 is deterministic.
(C) L1 is deterministic and L2 is not deterministic
(D) Both L1 and L2 are deterministic
Solution
Both are CFG as
L1 is generated by the grammar: S→aSb | ab
L2 is generated by the grammar: S→aSa | bSb | c
26(Q63) Given the following grammar
G1: S→AB |aaB, A→ aA | ε, B→bB | ε
G2: S→ A | B, A→aAb | ab, B→abB | ε
Which of the following is correct statement? [June 2015, Paper-III]
(1) G1 is ambiguous and G2 is unambiguous grammars
(2) G1 is unambiguous and G2 is ambiguous grammars
(3) Both G1and G2 are ambiguous grammars
(4) Both G1 and G2 are unambiguous grammars
Solution
Ambiguous
A context-free grammar is said to be an ambiguous grammar if there exists a string which
can be generated by the grammar in more than one way.
The string derived by more than one parse tree or, equivalently, more than one leftmost
derivation is called ambiguous grammar.
A context-free language is inherently ambiguous if all context-free grammars generating
that language are ambiguous.
10. Grammar G1
Consider the word w=’aab’
S S
A B a a B
a A b B b B
Ԑ
a A Ԑ
Ԑ
Therefore G1=is ambigious
Grammar G2
Consider the word w=’aab’
S S
A B
a b a b B
Ԑ
Therefore G2=is ambigious
Option (3) Both G1and G2 are ambiguous grammars- is correct
27(Q38) For every context free grammar (G) there exists an algorithm that passes any
w L(G)Ԑ in number of steps proportional to: [June 2013, Paper-III]
(A) ln|w| (B) |w| (C) |w|2
(D) |w|3
11. 28(Q17) Assume the statements S1 and S2 given as :
S1 : Given a context free grammar G, there exists an algorithm for determining whether
L(G) is infinite.
S2 : There exists an algorithm for determining whether two context free grammars
generate the same language.
Which of the following is true? [September 2013, Paper-II]
(A) S1 is correct and S2 is not correct
(B) Both S1 and S2 are correct
(C) Both S1 and S2 are not correct
(D) S1 is not correct and S2 is correct
29(Q40) The statements S1 and S2 are given as :
S1 : Context sensitive languages are closed under intersection, concatenation,
substitution and inverse homomorphism.
S2 : Context free languages are closed under complementation, substitution and
homomorphism.
Which of the following is correct statement? [June 2013, Paper-III]
(A) Both S1 and S2 are correct (B) S1 is correct and S2 is not correct
(C) S1 is not correct and S2 is correct (D) Both S1 and S2 are not correct
30(Q27) The context free grammar for the language L={ an
bm
| n≤m+3, n≥0, m≥0} is:
[December 2013, Paper-II]
(A) S→aaaA; A→aAb | B, B→Bb | ƛ
(B) S→aaaA | ;ƛ A→aAb | B, B→Bb | ƛ
(C) S→aaaA | aaA | ;ƛ A→aAb | B, B→Bb | ƛ
(D) S→aaaA | aaA | aA | ;ƛ A→aAb | B, B→Bb | ƛ
Solution
For m=0, n=0,1,2,3
L={a0
,a1
,a2
,a3
}={ , a,aa,aaa}ƛ
• Option (A) does not recognize ,aƛ , and aa. So it is not CFG for given L.
12. • Option (B) does not recognize a, and aa. So it is not CFG for given L.
• Option (C) does not recognize a. So it is not CFG for given L.
• Option (D) recognize ,aƛ , and aa. So it is correct CFG for given L→Correct option
31(Q21) Given the following statements:
S1: The grammars S→aSb | bSa | SS | a and S→aSb |bSa | a are not equivalent.
S2: The grammars S→SS | SSS | aSb | bSa | ƛ and S→SS | aSb | bSa | ƛ are
equivalent.
Which of the following is true? [ December 2013, Paper-III]
(A) S1 is correct and S2 is not correct (Key)
(B) Both S1 and S2 are correct
(C) S1 is not correct and S2 is correct
(D) Both S1 and S2 are not correct
Solution
The G1 in statement S1 can recognize string ‘aa’ but not by G2.
32(Q9) The context free grammar for the language L={ an
bm
ck
| k=|n-m|,n≥0, m≥0 ,k ≥0}
is: [June 2014, Paper-II]
(A) S→S1S3, S1→aS1c | S2 | ,ƛ S2→aS2b| ,ƛ S3→aS3b | S4 | , Sƛ 4→bS4c | ƛ
(B) S→S1S3,; S1→aS1S2c| ,ƛ S2→aS2b| ,ƛ S3→aS3b | S4 | Sƛ 4→bS4c | ƛ
(C) S→ S1 |S2; S1→aS1S2c| ,ƛ S2→aS2b| ,ƛ S3→aS3b | S4 | Sƛ 4→bS4c | ƛ
(D) S→ S1 |S3; S1→aS1c | S2 | ,ƛ S2→aS2b | ,ƛ S3→aS3b | S4 | Sƛ 4→bS4c | ƛ
(Key but wrong)
S→S1S3→aS1cS3→acS3→acaS3b→acab
Explanation
Case 1: n>m
k=n-m
n=k+m.
L1=an
bm
ck
= ak
am
bm
ck
.
S1→a S1 c | S2 | ƛ
S2→a S2 b | ƛ
Case 1: n=m
k=0
L2=an
bn
.
S3→a S3 b | ƛ
Case 3: m>n
k=m-n
13. m=n+k
L3=an
bm
ck
= an
bn
bk
ck
.
S4→S5 S6
S5→a S5 b | ƛ
S6→b S6 c | ƛ
Hence, L1 U L2 U L3
S→ S1 | S3 | S5
S1→a S1 c | S2 | ƛ
S2→a S2 b | ƛ
S3→a S3 b | ƛ
S4→S5 S6
S5→a S5 b | ƛ
S6→b S6 c | ƛ
S2,S3 and S5 are same
S→ S1 | S3
S1→a S1 c | S2 | ƛ
S2→a S2 b | ƛ
S3→ S2 S4
S4→b S4 c | ƛ
33(Q33) If all the production rules have single non-terminal symbol on the left side, the
grammar defined is: [June 2015, Paper-II]
(1) context free grammar (2) context sensitive grammar.
(3) unrestricted grammary (4) phrase grammar
34(Q32) The equivalent grammar corresponding to the grammar
G: S→aA, A→BB, B→aBb | is : [Ԑ June 2012, Paper-III]
(A) S→aA, A→BB, B→aBb
(B) S→a | aA, A→BB, B→aBb | ab
(C) S→a | aA, A→BB | B, B→aBb
(D) S→a | aA, A→BB | B, B→aBb | ab
35(Q61)A context free grammar for L= {w | n0(w) > n1(w)} is given by[June 2015, Paper-III]
(1) S→0 | 0S | 1SS (2) S→ 0S | 1S |0SS | 1SS | 0 | 1
(3) S→0 | 0S | 1SS | S1S | SS1 (4) S→ 0S | 1S | 0 | 1
36(Q50) Which of the following definition generates the same language as L, where
L={WWR
| W {a,b}*}: [Ԑ December 2012, Paper-III]
(A) S→aSb | bSa | Ԑ (B) S→aSa | bSb | Ԑ
(C) S→aSb | bSa | aSa | bSb | Ԑ (D) S→aSb | bSa | aSa | bSb
Solution
• Each occurrences of S replaced by terminal symbol either ‘aa’ or ‘bb’ or ‘ ’.Ԑ
• This ensure WWR
37(Q36) The grammar with production rules S→aSb | SS | generates language L givenƛ
by: [June 2012, Paper-III]
(A) L={w {a,b}* | nԐ a(w) = nb(w) and na(v) ≥ nb(v) where v is any prefix of w }
(B) L={w {a,b}* | nԐ a(w) = nb(w) and na(v) ≤ nb(v) where v is any prefix of w }
(C) L={w {a,b}* | nԐ a(w) ≠ nb(w) and na(v) ≥ nb(v) where v is any prefix of w }
(D) L={w {a,b}* | nԐ a(w) ≠nb(w) and na(v) ≤ nb(v) where v is any prefix of w
14. Solution
Consider the word w= ‘aababb’ recognized by the language
Prefixes are a,aa,aab,aaba.aabab, and aababb,
Hence, na(v) ≥ nb(v) where v is any prefix of w.
38(Q18).Givem The following productions of a grammar:
S→aA | aBB;
A→aaA | ;ƛ
B→bB | bbC;
C→B
Which of the following is true? [September 2013, Paper-III]
(A) The language corresponding to the given grammar is a set of even number of a’s.
(B) The language corresponding to the given grammar is a set of odd number of a’s.
(C) The language corresponding to the given grammar is a set of even number of a’s followed
by odd number of b’s
(D) The language corresponding to the given grammar is a set of oddnumber of a’s followed
by even number of b’s
Explanation
• The production rule 2 (i.e. S→aBB) does not recognize any string because non-
terminalB and C does not have production with only terminal(s).
• The production rule 1 (i.e. S→aA) only recognize odd number of a’s.
39(Q20).The language L = {an
bn
am
bm
| n≥0, m≥0} is [September 2013, Paper-III]
(A)Context free but not linear (B) Context free and linear
(C) Not Context free and not linear (D) Not Context free but linear
40(Q35). The following context free grammar (CFG):
S→aB | bA
A→a | aS | bAA
B→b |bS | aBB
Will generate [December 2014, Paper-II]
(A)Odd numbers of a’s and odd numbers of b’s.
(B) even numbers of a’s and even numbers of b’s.
(C)equal numbers of a’s and b’s.
(D)different numbers of a’s and b’s.
Pumping Lemma
41(Q40) Pumping lemma for context free languages states:
Let L be an infinite context free language. Then there exists some positive integer m
15. such that any w L with |w| ≥ m can be decomposed as w=uv xy Z with |vxyԐ | and
|vy| such that uvz
xyz
Z L for all z=0,1,2,… : [Ԑ December 2012, Paper-III]
(A) ≤m, ≤1 (B) ≤m, ≥1 (C) ≥m, ≤1 (D) ≥m, ≥1
42(Q23) Given two languages:
L1 = { (ab)n
ak
| n>k, k ≥0 }
L2 = { an
bm
| n≠m }
Using Pumping lemma for regular language, it can be shown that:[ Dec’2014, Paper-III].
(A) L1 is regular and L2 is not regular.
(B) L1 is not regular and L2 is regular.
(C) L1 is regular and L2 is regular.
(D) L1 is not regular and L2 is not regular.
43(Q63) :[ Dec’2014, Paper-III].
Please refer Q40 in Dec’2012, Paper-III.
Chomsky Normal Form
Every production in Griebach Normal form should be:
A→BC (or)
A→a
Where A,B, and C are variables( Non-terminals),
a-is a terminal
• On the right hand side you can have either two terminals or a single terminal.
44(Q53) If the parse tree of a word w generated by a Chomsky normal form grammar
has no path of length greater than I, then the word w is of length[Dec’2012, Paper-III]
(A)No greater than 2i+1
.
(B) No greater than 2i
.
(C)No greater than 2i+1
.
(D)No greater than i.
Greibach Normal Form
Every production in Griebach Normal form should be:
A→aα
Where A-is a variable( Non-terminal),
a-is a terminal and
α-is a only zero or more Variables (Non-terminals)
Example:
A→a | aBC | bC
16. B→b
C→c
45(Q28) Which one of the following is not a Greibach Normal form grammar?
[June 2012,Paper-III]
(i) S→ a | bA | aA |bB, A→a, B→b
(ii) S→ a | aA | AB, A→a, B→b
(iii) S→ a | A | aA, A→a
(A) (i) and (ii) (B) (i) and (iii) (C) (ii) and (iii) (D) (i), (ii) and (iii)
46(Q41) The Greibach Normal form grammar for the language L={an
bn+1
| n≥0} is
[December 2013,Paper-III]
(A) S→aSB, B→bB | ƛ
(B) S→aSB, B→bB | b
(C) S→aSB | b, B→b
(D) S→aSb | b
Pushdown Automata
47(Q37) A pushdown automation M=(Q, ∑, Γ, δ, q0,Z, F) is set to be deterministic subject
to which of the following condition(s), for every q €Q, a €∑ U { } and b € Γƛ
S1: δ(q,a,b) contains at most one element
S2: If δ(q, ,b) is not empty then δ(q,c,b) must be empty for every c € ∑.ƛ
[June 2013,Paper-III]
(A) Only S1 (B) Only S2 (C) Both S1 and S2 (D) Neither S1 nor S2
48(Q22) The pushdown automation M=( {q0,q1,q2},{a,b},{0,1}, δ, q0,0, {q0} ) with
δ(q0,a,0) = { q1, 10}
δ(q1,a,1) = { q1, 11}
δ(q1,b,1) = { q2, }ƛ
δ(q2,b,1) = { q2, }ƛ
18. δ(q0,a,S) = { (q1, SS) , (q1, B) };
δ(q0,b, ) = { (qƛ 1, B) }
δ(q1, ,z) = { (qƛ 1, ) }ƛ
Solution
Given,
S→aSS | ab
Let us consider the input string: aabab
(A) (B)
Initial: (q0, ƛaabab, z) (q0, ƛaabab, z)
→(q0, aabab, z) →(q0, aabab, Sz) [ z→Sz]ƛ
(no match for az→?) →(q1, abab, SSz) [aS→SS]
→(q1, bab, BSz) [aS→B]
→(q1, ab, Sz) [bB→ ]ƛ
→(q1, b, Bz) [aS→B]
→(q1, ƛ, z) [bB→ ]ƛ
→(q1, , ) [ z→ ]ƛ ƛ ƛ ƛ
(Accepted)
51(Q16) Given the following statements:
(i) The power of deterministic finite state machine and non-deterministic finite state
machine are same.
(ii) The power of deterministic pushdown automation and non-deterministic pushdown
automation are same.
Which of the above is the correct statement(s)? [June 2012, Paper-III]
(A)Both (i) and (ii) (B) Only (i) (C) only (ii) (D) Neither (i) nor (ii)
1. (Q1)Which of the following is not true? [June 2005, Paper-II]
(A) Power of deterministic automata is equivalent to power of non-deterministic automata.
(B) Power of deterministic pushdown automata is equivalent to power of non-deterministic
pushdown automata.
(C) Power of deterministic Turing machine is equivalent to power of non-deterministic Turing
q
0
q
1
ƛz→z z→ƛ ƛ
aS→SS
aS→B
bB→ƛ
q
0
q
1
ƛz→Sz z→ƛ ƛ
aS→SS
aS→B
bB→ƛ
19. machine.
(D) All the above
Answer: B
Recursive, Recursive Enumerable
52(Q40). Consider the following statements:
I. Recursive languages are closed under complementation.
II. Recursively enumerable languages are closed under union.
III. Recursively enumerable languages are closed under complementation
Which of the above statements are true? [June 2012, Paper-II]
(A) I only (B) I and II (C) I and III (D) II and III
53(Q57). Given the following statements:
(i) Recursive enumerable sets are closed under complementation.
(ii) Recursive sets are closed under complementation..
Which is/are the correct statements? [December 2012, Paper-III]
(A) Only (i) (B) Only (ii) (C) Both (i) and (ii) (D) Neither (i) nor (ii)
54(Q42). Given the following statements
S1: Every context-sensitive language L is recursive.
S2: There exists a recursive language that is not context sensitive.
Which statement is correct? [December 2013, Paper-III]
(A) S1 is not correct and S2 is not correct
(B) S1 is not correct and S2 is correct
(C) S1 is correct and S2 is not correct
(D) S1 is correct and S2 is correct
55(Q21). Assume statements S1 and S2, defined as
S1: L2-L1 is recursive enumerable where L1 and L2 are recursive and recursive
enumerable respectively
S2: The set of all Turing machines is countable.
Which of the following is true? [September 2013,Paper-III]
(A) S1 is correct and S2 is not correct
(B) Both S1 and S2 are correct
(C) Both S1 and S2 are not correct
(D) S1 is not correct and S2 is correct
20. Reason
• Every recursive language is recursive enumerable. Hence statement S1 is correct.
Recursive enumerable Language L2
• Turing Machines are composite, hence they are countable
Output
Input
56(Q61). Given the recursively enumerable language (LRE), the context sensitive language
(LCS), the recursive language (LREC), the context free language(LCF), and deterministic
context free language(LDCF). The relationship between these families is given by
[December 2014, Paper-III]
(A)LCF € LDCF € LCS € LRE € LREC
(B) LCF € LDCF € LCS € LREC € LRE
(C) LDCF € LCF € LCS € LRE € LREC
(D)LDCF € LCF € LCS € LREC € LRE
Solution
Recursive Enumerable
L2-L1
Recursive Language L1
TM
1
TM
2
TM
3
TM
n…
REC
CS
CF
DCE
21. 57(Q62) Given the following two statements:
S1 : If L1 and L2 are recursively enumerable languages over ∑, then L1 U L2 and L1 ∩
L2 are also recursively enumerable.
S2 : The set of recursively enumerable languages is countable.
Which of the following is correct?[June 2015, Paper-III]
(1) S1 is correct and S2 is not correct
(2) S1 is not correct and S2 is correct
(3) Both S1 and S2 are not correct
(4) Both S1 and S2 are correct
Match the following
58(Q52/Q62). Match the following:[June 2012/December 2014, Paper-III]
(i) Regular Grammar (a) Pushdown automation
(ii) Context free Grammar (b) Linear bounded automation.
(iii) Unrestricted Grammar (c) Deterministic finite automation.
(iv) Context Sensitive Grammar (d) Turing machine.
(i) (ii) (iii) (iv)
(A) (c) (a) (b) (d)
(B) (c) (a) (d) (b)
(C) (c) (b) (a) (d)
(D) (c) (b) (d) (a)
59(Q39). Match the following:[June 2013, Paper-III]
(a) Context sensitive language i . Deterministic finite automation.
(b) Regular Grammar ii. Recursive enumerable.
(c) Context free grammar iii. Recursive language
(d) Unrestricted Grammar iv. Pushdown automation
.
(a) (b) (c) (d)
(A) ii i iv iii
22. (B) iii iv i ii
(C) iii i iv ii
(D) ii iv i iii
60(Q74) Match the following:[June 2013, Paper-III]
List-I List-II
a. Chomsky Normal form i. S→bSS | aS |c
b. Griebach Normal form ii. S→aSb | ab
c. S-grammar iii. S→AS |a; A→SA | b
d. LL grammar iv. S→aBSB; B→b
Codes:
a b c d
(A) iv iii i ii
(B) iv iii ii i
(C) iii iv i ii
(D) iii iv ii i
Closure properties on languages
operation REG DCFL CFL CSL RC RE
union Y N Y Y Y Y
intersection Y N N Y Y Y
set difference Y N N Y Y N
complementation Y Y N Y Y N
intersection with a regular language Y Y Y Y Y Y
concatenation Y N Y Y Y Y
Kleene star Y N Y Y Y Y
Kleene plus Y N Y Y Y Y
reversal Y Y Y Y Y Y
homomorphism Y N Y N N Y
inverse homomorphism Y Y Y Y Y Y
substitution Y N Y N N Y
rational transduction Y N Y N N Y
right quotient with a regular language Y Y Y N Y
left quotient with a regular language Y Y Y N Y