1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Eva8 [605]
3 years ago
14

Write a regular expression of the language havingstrings that either start or end with "00" and have nomore zeroes. Where the al

phabet is {0,1}.
Computers and Technology
1 answer:
Brut [27]3 years ago
3 0

Answer:

001*|1*00

Explanation:

The language consists of strings in {0,1} that either start with 00 or end with 00 and have no more zeros.

The requirement can be divided into two parts:

1) Strings that start with 00 and have no more zeros

2) Strings that end with 00 and have no more zeros

Generating regular expressions for these parts:

1) 001*  - starts with two zeros and can have zero or more 1s later

2)1*00  - starts with zero or more 1s and ends with two zeros

So on combining with the or operator(|), the overall regular expression for the strings in the language becomes:

001*|1*00

You might be interested in
What is a perfect hashing function?
antiseptic1488 [7]

Answer:

First we understand what is hash function.A hash function is mostly used in Hashmaps. It maps different keys to a set of values.There may occur a case when we have same key but different values.This case is called collision.So we have to use different collision handling techniques that are open addressing and separate chaining.

A perfect hash function maps key-value pair such that there are no collisions.

3 0
3 years ago
Which statement outputs a double value in a field of nine characters with three digits after the decimal point?
zimovet [89]

Answer:

Console.WriteLine("Format Double: {0:n3}", num); //formatting output with 3 digit decimal point

Explanation:

Following are the program in c#

using System; // namespace  

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace Tasks

{

   class Program 2 // program2

   {        

                 

       static void Main(string[] args) // Main function

       {

 

           double num = 958254.73789621;   // variables          

           Console.WriteLine("Format Double: {0:n3}", num); //formatting output with 3 digit decimal point

           Console.Read();

       }

   }

}

Output:

Format Double : 958254.737

Here we have declared  a variable num of type double which store the value num=958254.73789621. To do format with the double number i used a syntax {0:n3}. This syntax {0:n3}is separated with :(colon) here 0 represent the value before the decimal point that is 958254 and n3 represent the value upto 3 decimal points. Hence this statement give the output with three digit after the decimal point .

 

3 0
3 years ago
You are given a class named Clock that has one int instance variable called hours.
Vlad [161]

Answer:

public Clock(int hours) {

       this.hours = hours;

   }

Explanation:

In Java programming language, Constructors are special methods that are called to initialize the variables of a class when a new object of the class is created with the new keyword. Consider the complete code for the class below;

<em>public class Clock {</em>

<em>    private int hours;</em>

<em>    public Clock(int hours) {</em>

<em>        this.hours = hours;</em>

<em>    }</em>

<em>}</em>

In this example above,  an object of this class can created with this statement Clock myclock = new Clock(6); This is a call to the constructor and passes a parameter (6) for hours

7 0
3 years ago
. _______ view focuses on the text and content of a document, without much information on the page layout.
Georgia [21]
Read view
It allows to hide all instrument panels
5 0
3 years ago
which of the following is not a step of the scientific method A.identifying the problem B.making observations C. making a hypoth
dangina [55]
I believe the correct answer is choice D. Making a law.

I don't believe the scientific method says anything about making a law.

I hope this helps you and have a great day!
3 0
3 years ago
Other questions:
  • Operating system software allows you to use your fingers, a mouse or other pointing device to select screen controls, such as bu
    5·2 answers
  • Universal Containers are using Salesforce for Order Management and has integrated with an in-house ERP system for order fulfilme
    5·1 answer
  • What is created for each user the first time the user logs onto windows?
    7·1 answer
  • Consists of a drive letter (preceded by a drive name when necessary) and colon, to identify the storage device, and one or more
    5·1 answer
  • Video-sharing sites such as youtube and vimeo provide a place to post short videos called clips, true or false?
    10·1 answer
  • A power supply serves as both a rectifier and transformer to convert AC house current to DC and to step down voltage from 110 V
    6·1 answer
  • Electronic mail is a
    9·1 answer
  • Bonjour ma question est: expliquer comment fonctionne une calculatrice qui ne contient pas une pile. Pouvez-vous m'aider?
    12·1 answer
  • Discuss the advantages of using analogue multi-tester or digital multi-tester over the other.​
    12·1 answer
  • Impromptu speaking ability is very important in the workplace to clearly and effectively communicate ideas. An effective impromp
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!