Questions
Usually, Djikstra’s shortest-path algorithm is not used on graphs with negative-weight edges because it may fail...

Usually, Djikstra’s shortest-path algorithm is not used on graphs with negative-weight edges because it may fail and give us an incorrect answer. However, sometimes Djikstra’s will give us the correct answer even if the graph has negative edges.
You are given graph G with at least one negative edge, and a source s. Write an algorithm that tests whether Djikstra’s algorithm will give the correct shortest paths from s. If it does, return the shortest paths. If not, return ‘no.’ The time complexity should not be longer than that of Djiksta’s algorithm itself, which is Θ(|E| + |V | log |V |).
(Hint: First, use Djikstra’s algorithm to come up with candidate paths. Then, write an algorithm to verify whether they are in fact the shortest paths from s.)

In: Computer Science

A parallel plate capacitor with plate separation d is connected to a battery. The capacitor is...

A parallel plate capacitor with plate separation d is connected to a battery. The capacitor is fully charged to Q Coulombs and a voltage of V. (C is the capacitance and U is the stored energy.) Answer the following questions regarding the capacitor charged by a battery.

For each statement below, select True or False.

1. With the capacitor connected to the battery, increasing d increases U.

2. After being disconnected from the battery, inserting a dielectric with κ will decrease V.

3. With the capacitor connected to the battery, decreasing d decreases Q.

4. After being disconnected from the battery, inserting a dielectric with κ will increase U.

5. After being disconnected from the battery, inserting a dielectric with κ will decrease C.

6. After being disconnected from the battery, decreasing d increases C.

In: Physics

1. Electric Dipoles vs Magnets. Name 2-3 similarities between electric dipoles and magnets in broad terms...

1. Electric Dipoles vs Magnets. Name 2-3 similarities between electric dipoles and magnets in broad terms of forces and motion. Name 1-2 differences between electric dipoles and magnets.

2. Explain the meaning of Magnetic Field Superposition. What is superimposed on what?

In: Physics

solidify and refine a business idea. Report your idea in 300 words or less that includes...

solidify and refine a business idea.

Report your idea in 300 words or less that includes a product/business name, the problem to be solved, the solution offered, target market and the profit potential and any other relevant support for your idea. [Include your business name in the thread title]

In: Economics

Two women in a group of 25 people shared the same name and the same birthday....

Two women in a group of 25 people shared the same name and the same birthday. Discuss whether this is a surprising result. Do you think it is more likely that you will find a pair of people in a room of 25 who share a first name or a pair of people who share a birthdate?

In: Statistics and Probability

1. What events or historical forces contributed to the Boston busing crisis of the mid-1970s? Name...

1. What events or historical forces contributed to the Boston busing crisis of the mid-1970s? Name at least three, and briefly explain why you think each one was a contributory cause of the Boston busing crisis

2. Name three specific consequences of the Boston busing crisis.

In: Psychology

Java Create a method to display a menu. When this method is called it should receive...

Java

Create a method to display a menu. When this method is called it should receive the user's name, great the user, and ask them to make a selection. 1 - Change your name, 2 - Test your IQ, 3 - Display a table, 4 - Play a game, 5 - Exit.

In: Computer Science

write Java program has two classes ,( using Inheritance ) first class set ( id ,...

write Java program has two classes ,( using Inheritance )

first class set ( id , name ) and method output

second class ( id , name , Mark 1 , Mark 2 , Mark 3 )

method total , average , grade , results ( if the student pass or not ) , and output method

In: Computer Science

Here is class Dog -String name; -int age -String breed; -boolean adopted; //false if available …………………...

Here is class Dog

-String name; -int age

-String breed;

-boolean adopted; //false if available ………………… +constructor, getters, setters, toString() Write a lambda expression showAdoptable using a standard functional interface that will display the dog’s name age and breed if adopted is false.

Help please!!

In: Computer Science

PRG/280 Week Three Assignment – Input Types and Form Designation Based on the readings for this...

PRG/280 Week Three Assignment – Input Types and Form Designation

  1. Based on the readings for this week, list the input types supported in HTML in general, and input types supported only in HTML5.
  1. HTML Input Types
      1. HTML5 Input Types
        1.   
    1. Study the HTML code snippet that appears below and answer these questions:
      1. Based on the code below, where will this form be sent after the user clicks the Submit button?
      2. How would the HTML code need to be changed if you wanted the contents of the form to be sent to [email protected] after the user clicks the Submit button? Give the entire new HTML statement that would be required to do this.

    <!DOCTYPE html>

    <html>

    <head>

    <link rel="stylesheet" href="MyStyle.css">

    </head>

    <body>

    <nav>

                <a href="GroceryHome.html">Home</a> |

                <a href="Products.html">Products</a> |

                <a href="AboutUs.html">About Us</a> |

                <a href="Contact.html">Contact</a>

    </nav>

    <header>

         <h1> My Contact Page</h1>

    </header>

    <article>

    Thank you for your interest in our grocery store. We offer delivery or call-ahead pickup services. Please provide your contact information, and indicate your family's food preferences.

    </article> <p>

    <form action="#" method="post" id="form1">

    <div class="div1">

    <label for="fname1" >First Name:</label><br>

    <input type="text" name="firstname1" id="fname1"><br>

    <label for="lname1" >Last Name:</label><br>

    <input type="text" name="lastname1" id="lname1"><br>

    <label for="phone1" >Phone (i.e. 123-456-7890):</label><br>

    <input type="text" name="phone1" id="phone1" placeholder="123-456-7890" ><br>

    <label for="email1" >Email:</label><br>

    <input type="text" name="email1" id="email1" placeholder="abc@xyz"><br>

    <label for="contactpreference1" >Prefered contact method?</label><br>

    <input type="radio" name="contactpreference1" value="phone" checked> Phone

    <input type="radio" name="contactpreference1" value="email"> Email

    <br><br>

    <input type="submit" id="Submit1" value="Submit" onclick=" validateMyPage()" />

    </div>

    </form>

    In: Computer Science