Preview

consumer behaviour

Satisfactory Essays
Open Document
Open Document
1027 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
consumer behaviour
CS 172: Computability and Complexity

Regular Expressions

Sanjit A. Seshia
EECS, UC Berkeley

Acknowledgments: L.von Ahn, L. Blum, M. Blum

The Picture So Far
DFA

NFA

Regular language S. A. Seshia

2

1

Today’s Lecture
DFA

Regular language NFA

Regular expression S. A. Seshia

3

Regular Expressions
• What is a regular expression?

S. A. Seshia

4

2

Regular Expressions
• Q. What is a regular expression?
• A. It’s a “textual”/ “algebraic” representation of a regular language
– A DFA can be viewed as a “pictorial” /
“explicit” representation
• We will prove that a regular expressions
(regexps) indeed represent regular languages
S. A. Seshia

5

Regular Expressions: Definition σ is a regular expression representing {σ} σ (σ∈Σ) ε is a regular expression representing {ε}
∅ is a regular expression representing ∅
If R1 and R2 are regular expressions representing L1 and L2 then:
(R1R2) represents L1⋅L2
(R1 ∪ R2) represents L1 ∪ L2
(R1)* represents L1*
S. A. Seshia

6

3

Operator Precedence
1.

2.

3.

*



( often left out; a·b ab )

S. A. Seshia

7

Example of Precedence

R1*R2 ∪ R3 = ( ( R1* ) R2 ) ∪ R3

S. A. Seshia

8

4

What’s the regexp?
{ w | w has exactly a single 1 }

0*10*

S. A. Seshia

9

What language does
∅* represent?

{ε}

S. A. Seshia

10

5

What’s the regexp?
{ w | w has length ≥ 3 and its 3rd symbol is 0 }

Σ2 0 Σ *
Σ = (0 ∪ 1)

S. A. Seshia

11

Some Identities
Let R, S, T be regular expressions
• R∪∅ = ?
• R·∅ =?
• Prove: R ( S ∪ T ) = R S ∪ R T
(what’s the proof idea?)

S. A. Seshia

12

6

Some Applications of
Regular Expressions
• String matching & searching
– Utilities like grep, awk, …
– Search in editors: emacs, …

• Programming Languages
– Perl
– Compiler design: lex/yacc

• Computer Security
– Virus signatures
S. A. Seshia

13

Virus Signature as String

pop

You May Also Find These Documents Helpful

  • Powerful Essays

    Consumer Behaviour

    • 2912 Words
    • 12 Pages

    INTRODUCTION Consumer behaviour study is based on consumer buying behaviour, with the consumer playing the three distinct roles of users, payer and buyer. Consumer behaviour is the study of when, why, how, and where people do or do not buy products. It blends elements from psychology, sociology, social anthropology and economics. It attempts to understand the buyer decision making process, both individually and in groups. It studies characteristics of individual consumers such as demographics…

    • 2912 Words
    • 12 Pages
    Powerful Essays
  • Powerful Essays

    Consumer Behaviour

    • 1326 Words
    • 6 Pages

    CONSUMER BEHAVIOUR ‘Evaluate the use of multi-attribute models to predict consumer behaviour The multi-attribute models are theories which use the consumer’s attitudes to predict their behaviour toward a product. An attitude it’s to have a positive or negative reaction facing a product. Many models were born during the last century. But do they have a real impact on the consumer behaviour? Are they really useful to predict it? We try to ask to these questions in studying six of these models…

    • 1326 Words
    • 6 Pages
    Powerful Essays
  • Good Essays

    Consumer Behaviour

    • 1141 Words
    • 5 Pages

    CONSUMER BEHAVIOUR IN TOURISM The study of consumer behaviour focuses on how individuals make decisions to spend their available resources (time, money, effort) on consumption-related items. The field of consumer behavior covers a lot of ground. According to Solomon (1996), consumer behavior is a study of the processes involved when individuals or groups select, purchase, use, or dispose of products, services, ideas, or experiences to satisfy needs and desires. The marketer needs to understand…

    • 1141 Words
    • 5 Pages
    Good Essays
  • Good Essays

    Consumer Behaviour

    • 2386 Words
    • 10 Pages

    Consumer Behaviour Topic 10 Group Influence on the Purchasing Decision Consumers belong to or admire many different groups and are often influenced in their purchase decisions by a desire to be accepted by others. One form of group that has a definite impact on consumer behaviour is the reference group. A reference group is “an actual or imaginary individual or group conceived of having significant relevance upon an individual’s evaluations, aspirations, or behaviour.” Reference groups have…

    • 2386 Words
    • 10 Pages
    Good Essays
  • Satisfactory Essays

    Consumer Behaviour

    • 604 Words
    • 3 Pages

    Consumer Behaviour Survey and Survey Location • The survey was carried out at DMart, Borivali (West) by me in order to get an insight of the consumers mind while purchasing soap • This survey is based on and concluded on basis of an in-depth questioning of my 30 subjects on various issues like which brand you use, why you use I etc Introduction • In simple words, ‘Consumer Behaviour is the study of when, why, how, and where people do or do not buy a product • It…

    • 604 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    Consumer Behaviour

    • 3239 Words
    • 13 Pages

    Consumer Behaviour: CHAPTER 1 Consumer behaviour and marketing strategy: * market segmentation * positioning strategy * new market applications * global marketing * marketing mix * consumerism, ethics and non profit marketing Consumer behaviour is product person situation specific * product specific * person individual * situation Consumer behaviour * a discipline dealing with how and why consumers purchase (or don’t purchase) products and services…

    • 3239 Words
    • 13 Pages
    Powerful Essays
  • Powerful Essays

    Consumer behaviour

    • 2570 Words
    • 9 Pages

    outlet in a coffeeshop along East Coast Road, opposite the current 112 Katong Mall in 2005. (Astons, 2009)It specializes in steak and has attracted the media interest and a group of loyal consumers for its tasty fare (steaks), reasonable pricing and good service. With good response and feedback from consumers, Aston Specialties shifted a few doors away and opened its very own shop-front to provide its customers with a better dining experience in a spacious and comfortable environment. Astons’…

    • 2570 Words
    • 9 Pages
    Powerful Essays
  • Powerful Essays

    Consumer Behaviour

    • 1686 Words
    • 7 Pages

    A MODEL OF CONSUMER DECISION MAKING The process of consumer decision making has 3 stages: input stage, process stage and output stage. The input stage influences the consumer’s recognition of a product need and consists of 2 major sources of information: 1) the company’s marketing efforts (product, price, promotion and price) and the external sociological influences on the consumer (family, friends, neighbours other informal and non-commercial sources, social class and cultural and subcultural…

    • 1686 Words
    • 7 Pages
    Powerful Essays
  • Powerful Essays

    Consumer Behaviour

    • 2628 Words
    • 14 Pages

    CONSUMER BEHAVIOUR MANAL KHOSLA A3906413412 C-50 ACKNOWLEDGMENTS My sincere thanks to Faculty Guide under whose able guidance and kind cooperation I was able to complete the project work titled "Consumer Behaviour” Also, I do thank my friends and family for helping me . Every effort has been made to enhance the quality of work. However, I owe the sole responsibility of the shortcoming, if any, in the study. ABSTRACT Consumer behaviour is the study of individuals, groups, or organizations…

    • 2628 Words
    • 14 Pages
    Powerful Essays
  • Powerful Essays

    Consumer Behaviour

    • 1629 Words
    • 7 Pages

    3/11/2013 Consumer behaviour Lect. M.Černikovaitė © lekt. M.Černikovaitė 1 Consumer behaviour          Definition of consumer bahaviour External and internal factors influencing conumer behaviour Decision making process R. Urbanskienė ir kt. Vartotojų elgsena. KTU. 2000. Schiffman, Leon G. Et al; Consumer Behavior. 2003. Consumer behaviour : applications i n marketing / Robert East, Malcolm Wright and Marc Vanhuele. -- Los Angeles (Calif.) : Sage Publications…

    • 1629 Words
    • 7 Pages
    Powerful Essays