Compute the set of nodes in G that satisfy EF

Assignment Help Python Programming
Reference no: EM132390036

CPTS515

Do in Python using pyEDA package .

0. Let G be a graph over 32 nodes (namely, node 0, , node 31). Forall 0 ≤ i,j ≤31, there is an edge from node i to node j iff (i + 3)%32 = j%32 or (i + 8)%32 = j%32. (% is the modular operator in C; e.g., 35% 32=3.) A node i is even if i is an even number. A node i is prime if i is a prime number. In particular, we define [even] as the set {0,2,4,6....30} and [prime] as the set { 3, 5, 7, 11, 13, 17, 19, 23, 29, 31} . We use R to denote the set of all edges in G.

1. (write-up) Let p be a CTL formula while [p] is the set of nodes in G that satisfy p.

Please design a fix-point iteration algorithm that computes [EF p](the set of nodes in G that satisfy EF p from R and [p]).

Please design a fix-point iteration algorithm that computes [EGp](the set of nodes in G that satisfy EGp from R and [p]).

You may first study the algorithms for [AGp] and [AF p].

2. (coding inPython)Every finite set can be coded as a BDD. Please write a Python program to compute [EG(even EFprime)] (the set of nodes that satisfy the formula EG( even EF prime).), and verify your answer by checking

node 5 satisfies EG(even Λ EF prime) and

node 6 doesnt satisfy EG(even Λ EF prime).

(Important: your code shall first encode R, [even], [prime] in BDDs using pyEDA and then using methods provided with the package, implement the iteration algorithms provided in 3 symbolically inBDD using methods in the package. Many students find methods BDD. compose()andBDD. smoothing() are quite useful in the package.)

3. (write-up) To make use of the idea of BDDs, a major difficulty is which graph is chosen to model a given set of data. When the graph is too large, the symbolic exploartion algorithm would not even run efficiently.  However, if the graph is too small, the modeling might not be even realistic. We now think about an example problem. Consider a finite set L of DNA strands, where each strand is simply a string on alphabet {A, T, C, G} (that is, a strand is a sequence of nucleotides, each of which is chosen from four nitrogen-containing nucleobases.).

One may use a deterministic finite automaton (DFA)1 M (which itself is a graph) to model the set L; i.e L ⊆ L(M ). That is, each strand w in L, there is a walk in M (from the initial state to an accepting state) such that the symbols sequentially collected on the transitions on the walk form exactly the w. Clearly, many many different M can be used to model L(e.g., M canbe ridiculously simplewithonly one state andaccepting every word onthe alphabet.).

Consequently,oneneed come up with ametric Q(M,L), which is a real number,to characterize the "precision" on using the given M to model L. When this is done, one can argue, for two given DFAs M1 and M2 which both model the given L, which model is more precise. Now, you need write a mini-paper (of 1 or 2 or more pages) in figuring out ways to define Q(M, L) and to design algorithms to compute Q(M, L).

Reference no: EM132390036

Questions Cloud

Describe a health-related issue you chose in girls or women : Briefly describe a health-related issue you chose in girls or women. Briefly describe how the program relates to at least two theories.
What are the characteristics of a concept : What is a concept? What are the characteristics of a concept? Discuss the process of critical thinking, and detail the two components of it as well.
Describe goals for the client based on presenting problem : In order to provide the appropriate intervention, social workers first need to have conducted a thorough assessment. Having a comprehensive understanding.
How can applied anthropology help make things safer : Discuss the reality that natural disasters have different effects and mortality rates in different economies. How can applied anthropology help make things.
Compute the set of nodes in G that satisfy EF : CPTS515- Design a fix-point iteration algorithm that computes the set of nodes in G that satisfy EF p from R and P. Design algorithms to compute Q
Determine the main idea of the article : Recall from Week 1 that main ideas and thesis sentences are really two sides of the same coin. Writers create thesis sentences. Readers pick out the main idea.
What you learned and found interesting about recent article : Please view the following article, and discuss what you learned and/or found interesting about this recent article on the latest findings.
Why were the parties unable to reach pareto optimality : Prior to the conflict stalling, how did the parties deal with the integrative and distributive aspects of the negotiation? Why were the parties unable to reach.
Describe the different divisions of the motor system : There are significant differences in the ability of individuals to perform complex motor skills. Discuss how the different divisions of the motor system.

Reviews

Write a Review

Python Programming Questions & Answers

  Ask from the user a string s, print a string

Ask from the user a string s, print a string where all occurrences of its first char have been changed to '*', except do not change the first char itself.

  Write a program that request the number of begels ordered

A bagel shop charges 75 cents per begal for orders of less than a half-dozen bagels and 60 cents per begal for orders of a half-dozen or more.

  Write a program that randomly generates two integers

Write a program that randomly generates two integers between 1 and 10. Add an input validation loop that ensures the user can only enter.

  Organise and present a data analysis report

Develop creative approaches to solving the wrangling/analysis problems - Apply relevant Python programming concepts to a data analysis challenge

  Write a boolean function which takes an integer as argument

Write a Boolean function named is_prime which takes an integer as an argument and returns true if the argument is a prime number, or false otherwise.

  Create a script that examines a string for the occurrence

Create a script that examines a string for the occurrence of a particular letter in the string Geographic Information Systems.

  Create a simple pattern search script

Your task for this project is to create a simple pattern search script. Define a regular expression pattern to search for non alphanumeric values

  Determine an athletes final score for the event

Determine an athletes final score for the event, the highest and lowest judges' scores are discarded and then the average of the rest of the scores

  A program that takes three integers as command-line argument

Write a program triangle.py that takes three integers as command-line arguments.

  Create a function that takes an argument

Define a function that takes an argument. Call the function. Identify what code is the argument and what code is the parameter.

  How are you going to be doing the payroll calculations

How are you going to be doing the payroll calculations? What kind of data is going to be stored in your database?

  Create a function that expects no arguments

Create a function called allButMax that expects no arguments. Instead, this functiongets its input from the user at the keyboard.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd