Question

Formal Methods Introduction What are some possible disadvantages of formal methods? Given the sets A = {1,2,5,6}, B = {1,3,5,7,9}, C= {x|x Element_of A and x < 4} What are the fo...

Formal Methods Introduction

  1. What are some possible disadvantages of formal methods?
  2. Given the sets
              A = {1,2,5,6},    B = {1,3,5,7,9},     C= {x|x Element_of A and x < 4}
    
    What are the following:
    • A union B
    • B intersection C
    • A - B (also written A \ B)
    • P A (ie Powerset of A)
    • A \ A (also written A - A)
  3. Given the function f = { (1,1), (2,3), (3,7), (4,0), (5,10) }, write down the following:
    • dom(f)
    • ran(f)
    • f override_op { (1,0) }
    • f domain_subtraction_op {3,4}
    • f range_subtraction_op {0,3}
  4. Given the declarations
            x,y,z : Z;   (where Z is the set of integers)
            a : Author;
            b : Book;
            on_shelves : P Book;
            novelists : P Author;
    
    What is the type of each of the following:
    1. x
    2. x + y
    3. {x,y}
    4. {{x}, {y}}
    5. {on_shelves}
    6. on_shelves union {b}
  5. Develop expressions using logic and set operators for the following statements:Use the function expressions M(x,y) and G(x,y) to represent the "mother of" and the "grandmother of" functions respectively.
    Use A(x) for the function that given a persons name returns the age of the person in years.
    Write down the type of each of the above functions.
    • "For all x and y, if x is mother of y and y is the mother of z, then x is the grandmother of z."
    • "Everyone older than 30 is a mother."
  6. Consider the sets
                 Lecturer = {Ray, Lindsay, Kim, Ken, Wendy}
                 Subject  = {SE, DB, HC, CP}
    
                 teaches = { (Ray,SE), (Lindsay,DB), (Kim,HC), (Ken,CP), (Wendy,HC) }
    
    1. Is "teaches:Lecturers->Subjects" a legitimate function? Why or why not?
    2. Is it possible to write the inverse function that given a Subject returns a Lecturer?
  7. Develop expressions using logic and set operators for the following statements:
    • "There exists some integer less than 100"
    • "For every integer x there is an integer y such that x-y = 1"
    • "Every person x has a friend y that has a friend z that is an enemy of x"
    • "All the girls love a sailor"
0 0
Add a comment Improve this question Transcribed image text
Answer #1
  1. Disadvantages of formal methods: Here I assume that it is with respect to software engineering approach.
    • System customers are unlikely to be familiar with formal specification techniques.
    • Some classes of problems are hard to describe using formal methods
    • Some software engineers are not trained to use and develop the formal models
    • Extensive training for personnel is required
    • It may become time consuming in some cases
  2. Given 4-11, 2, 5,6 , B= {1.3.5.7.9} and C = \{x|x\in A \land x<4\} = \{1,2\}
    • AUB-1,2,3,5, 6,7,9^
    • B\cap C = \{1\}
    • A - B = \{2,6\}
    • \mathcal{P}(A) = \{\emptyset, \{1\},\{2\}, \{5\}, \{6\}, \{1,2\},\{1,5\}, \{1,6\}, \{2,5\}, \{2,6\}, \{5,6\}, \{1,2,5\}, \{1,2,6\}, \{1,5,6\}, \{2,5,6\}, \{1,2,5,6\} \}
    • A-A = \emptyset
  3. Given f = {(1, 1). (2.3). (3.7). (4:0). (5. 10)}
    • don( f ) { 1. 2. 3. 4. 5}
    • range(f)-(0. 1. 3. 7. 10}
    • f~ \texttt{override\_op} ~\{(1,0)\} = \{ (1,0), (2,3), (3,7), (4,0), (5,10) \}
    • f ~\texttt{domain\_subtraction\_op} ~\{3,4\} = \{ (1,1), (2,3), (5,10) \}
    • f ~\texttt{range\_subtraction\_op} ~\{0,3\} = \{ (1,1), (3,7), (5,10) \}​​​​​​​
Add a comment
Know the answer?
Add Answer to:
Formal Methods Introduction What are some possible disadvantages of formal methods? Given the sets A = {1,2,5,6}, B = {1,3,5,7,9}, C= {x|x Element_of A and x < 4} What are the fo...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT