Questions
write a program in matlab to produce a discrete event simulation of a switching element with...

write a program in matlab to produce a discrete event simulation of a switching element with 10 inputs and 3 outputs. Time is slotted on all inputs and outputs. Each input packet follows a Bernoulli process. In a given slot, the independent probability that a packet arrives in a slot is p and the probability that a slot is empty is (1– p). One packet fills one slot. For a switching element if 3 or less packets arrives to some inputs, they are forwarded to the switching element outputs without a loss. If more than 3 packets arrive to the inputs of the switching element, only 3 packets are randomly chosen to be forwarded to the switching element outputs and the remaining ones are discarded. In your simulation the program will mimic the operation of the switch and collect statistics. That is, in each time slot the program randomly generates packets for all inputs of the switching element and counts how many packets can be passed to the output of the switching element (causing throughput) and, alternatively counts how many packets are dropped (when the switching element has more than 3 input packets at a given time slot) . Your task is to collect throughput statistics for different values of p (p = 0.05, 0.1 up to 1.0 in steps of 0.05), by running the procedure described above for each value of p and for many slots (at least a thousand slots per value of p). The more simulated slots, the more accurate the results will be. Based on this statistics, plot two graphs: 1) the average number of busy outputs versus p, and 2) the average number of dropped packets versus p.

In: Statistics and Probability

android studio Reproduce the same action as this using a ListView. <resources> <string-array name="pizzas"> <item>Ham and...

android studio

Reproduce the same action as this using a ListView.

<resources>
<string-array name="pizzas">
    <item>Ham and Pineapple</item>
    <item>Supreme</item>
    <item>Seafood</item>
    <item>Italian</item>
    <item>Meat Lovers</item>
</string-array>
</resources>

Following is the layout XML File

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <Spinner
        android:id="@+id/spinner"
        android:layout_width="368dp"
        android:layout_height="wrap_content"
        tools:layout_editor_absoluteX="8dp"
        tools:layout_editor_absoluteY="42dp" />

    <TextView
        android:id="@+id/textView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="TextView"
        tools:layout_editor_absoluteX="163dp"
        tools:layout_editor_absoluteY="145dp" />
</android.support.constraint.ConstraintLayout>

Following is the JAVA main File.

package com.example.wincrap.myapplication;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {

    private Spinner spinner;
    public TextView textView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        spinner = (Spinner)findViewById(R.id.spinner);
        textView = (TextView) findViewById(R.id.textView);
        ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.pizzas, android.R.layout.simple_spinner_item);
        adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        spinner.setAdapter(adapter);

        spinner.setOnItemSelectedListener(
                new AdapterView.OnItemSelectedListener() {
                    @Override
                    public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
                        textView.setText(String.valueOf(parent.getItemAtPosition(position).toString()));
                    }

                    @Override
                    public void onNothingSelected(AdapterView<?> parent) {

                    }
                }
        );

        setContentView(R.layout.activity_main);

    }
}

In: Computer Science

Lake Community College gives its faculty the option of receiving the balance of their contract at...

  1. Lake Community College gives its faculty the option of receiving the balance of their contract at the end of the semester on May 17, 20--. The faculty can receive one lump-sum payment instead of receiving the remaining seven biweekly pays over the summer. Use the data given below to complete the Payroll Register on May 17. No employee has reached the OASDI ceiling, and all employees are taking the lump-sum payment. The state withholding rate is 2.0% of total earnings; the city withholding rate is 1.0% of total earnings. The biweekly wage bracket is used for federal income taxes.

    To calculate the tax withholdings, you must calculate the rounded tax for each pay and multiply by the number of pays in the lump-sum payment.

    Round all values to the nearest cent.

    Click here to access the Wage-Bracket Method Tables.

    For Period Ending May 17




    Employee Name
    Marital
    Status
    No. of
    W/H
    Allow.
    Biweekly
    Earnings
    (a) Deductions (f)
    Total Lump-Sum
    Payment
    (b) FICA (c) (d) (e) Net
    OASDI HI FIT SIT CIT Pay
    Kinnery, Thomas S 1 $2,000.00 $ $ $ $ $ $ $
    Matthews, Mary M 2 2,600.00
    Grace, Catherine S 0 2,200.00
    Michael, Sean S 1 2,060.00
        Totals $8,860.00 $ $ $ $ $ $ $

    Compute the employer's FICA taxes for the pay period ending May 17.

    OASDI Taxes HI Taxes
    OASDI taxable earnings $ HI taxable earnings $
    OASDI taxes $ HI taxes $

In: Accounting

SECURITY MARKET LINE You plan to invest in the Kish Hedge Fund, which has total capital...

SECURITY MARKET LINE

You plan to invest in the Kish Hedge Fund, which has total capital of $500 million invested in five stocks:

Stock Investment Stock's Beta Coefficient
A $160 million 0.6
B 120 million 2.0
C 80 million 3.9
D 80 million 1.0
E 60 million 2.7

Kish's beta coefficient can be found as a weighted average of its stocks' betas. The risk-free rate is 4%, and you believe the following probability distribution for future market returns is realistic:

Probability Market Return
0.1 (5%)
0.2 9
0.4 11
0.2 13
0.1 16
  1. What is the equation for the Security Market Line (SML)? (Hint: First determine the expected market return.)
    1. ri = 2.9% + (5.9%)bi
    2. ri = 2.9% + (5.0%)bi
    3. ri = 4.0% + (5.9%)bi
    4. ri = 1.6% + (7.1%)bi
    5. ri = 4.0% + (5.0%)bi

  • Calculate Kish's required rate of return. Do not round intermediate calculations. Round your answer to two decimal places.
    %
  • Suppose Rick Kish, the president, receives a proposal from a company seeking new capital. The amount needed to take a position in the stock is $50 million, it has an expected return of 15%, and its estimated beta is 1.5. Should Kish invest in the new company?
    The new stock
  1. be purchased.

    At what expected rate of return should Kish be indifferent to purchasing the stock? Round your answer to two decimal places.
    %

In: Finance

Iconic memory is a type of memory that holds visual information for about half a second...

Iconic memory is a type of memory that holds visual information for about half a second (0.5 seconds). To demonstrate this type of memory, participants were shown three rows of four letters for 50 milliseconds. They were then asked to recall as many letters as possible, with a 0-, 0.5-, or 1.0-second delay before responding. Researchers hypothesized that longer delays would result in poorer recall. The number of letters correctly recalled is given in the table.

Delay Before Recall

0

0.5

1

10

10

7

4

4

4

9

6

2

11

5

4

6

3

3

8

8

4

(a) Complete the F-table. (Round your values for MS and F to two decimal places.)

Source of Variation

SS

df

MS

F

Between groups

Within groups (error)

Total


(b) Compute Tukey's HSD post hoc test and interpret the results. (Assume alpha equal to 0.05. Round your answer to two decimal places.)

The critical value is_____ for each pairwise comparison.


Which of the comparisons had significant differences? (Select all that apply.)

-Recall following no delay was significantly different from recall following a half second delay.

-The null hypothesis of no difference should be retained because none of the pairwise comparisons demonstrate a significant difference.

-Recall following a half second delay was significantly different from recall following a one second delay.

-Recall following no delay was significantly different from recall following a one second delay.

In: Math

A wastewater containing 150 mg/l chlorobenzene is treated in a laboratory adsorption unit using a PVC...

A wastewater containing 150 mg/l chlorobenzene is treated in a laboratory adsorption unit using a PVC column, 1.0 inch internal diameter, to an effluent concentration of 15 mg/l . Service times, and throughput volumes at specified depths and flowrates associated with a breakthrough concentration of 15.0 mg/l are given in table 1.

table1 : result of adsorption column experiment

Loading rate,gpm/ft2   Bed depth,ft Throughput volume, gal Time, hr

loading rate

gpm/ft2

bed depth

ft

throughput volume,

gal

time,

hr

2.5 3.0 810 980
5.0 1750 2230
7.0 2910 3440
5.0 3.0 605 420
5.0 1495 1000
9.0 3180 2185
7.5 5.0 1183 452
9.0 2781 1075
12.0 4000 1564

1) is the attainable effluent concentration satisfactory from a regulatory standpoint?

2) determine the Bohart-Adams constant ( K,N0 and x0) for each hydraulic loading.

3)base on data derived above design an adsorption column 2.0 ft internal diameter to treat a wastewater flow 5,000 gal/d containing 150 mg/l of CB. The attainable effluent concentration is 15 mg/l and it is desired to operate the column for 90 days(8 hourslday,7 days/week) before reching exhaustion.

4)calculate the yearly carbon requirements in cubic feet.

what kind of information do you need? these are all what i got from paper

In: Chemistry

If the specific weight of a liquid is 8.1 kN/m­­­­3, what is its density? If the...

  1. If the specific weight of a liquid is 8.1 kN/m­­­­3, what is its density?
  1. If the specific volume of a gas is 0.70 m3/kg, what is its specific weight in N/m3?
  1. If a certain liquid weighs 8600 N/m3, what are the values of its density, specific volume, and specific gravity relative to water at 40C?
  1. At a depth of 12 m of a solvent the pressure at the bottom of the covered storage tank due to the solvent was 350 kPa. Calculate density of the solvent.
  1. At what depth within a salt water solution will the gauge pressure be equal to three times the atmospheric pressure?                    
    ρ salt water=1100 kg/m3                                             atmospheric pressure =101,325 Pa
  1. How large must a heating duct be if air moving 3 m/s along it can replenish the air in a room of 300 m3 volume every 15 minutes? Assume the air’s density remains constant.
  1. Water is flowing in a fire hose with a velocity of 1.0 m/s and a pressure of 200000 Pa. At the nozzle the pressure decreases to atmospheric pressure (101300 Pa), there is no change in height. Use the Bernoulli equation to calculate the velocity of the water exiting the nozzle.   
  1. At Petrojam, fuel is flowing through a pipe at a velocity of 1 m/s and a pressure of 101300 Pa. They need the fuel to be at a pressure of 3 atm (202600 Pa) on a lower level. How far must the pipe drop in height in order to achieve this pressure if the velocity does not change? The density of the fuel is 789 kg/m3.

In: Mechanical Engineering

Monica Dubois, an ABC investment advisor, has a new client, Mr. Jack Klein. Mr. Klein is...

Monica Dubois, an ABC investment advisor, has a new client, Mr. Jack Klein. Mr. Klein is a conservative investor who is interested in a required rate of return of 10% on his stock investments while assuming lower market risk. You are asked to help Monica make a suitable portfolio recommendation backed by risk-return calculations. The 3 possible stock choices for Mr. Klein and their respective betas are as follows: Stock Expected Return Beta ABC 10% 0.75 XYZ 11% 1.0 WHY 12% 1.25 Part I Determine the expected returns and beta for a portfolio consisting of one third of Mr. Klein's funds in each stock. Part II Assume the following: Each ABC stock pays current dividends of $1.50 annually with 6% expected annual increases. The current market stock price for ABC is $30 per share. Each XYZ stock pays current dividends of $1.75 annually with 6% expected annual increases. The current market stock price for XYZ is $27 per share. Each WHY stock pays current dividends of $2.25 annually with 7% expected annual increases. Current market stock price for WHY is $35 per share. Complete the following for this assignment: Using the constant dividend growth model, determine whether ABC and WHY are over- or undervalued. For what types of companies is the constant growth model an appropriate analysis tool? What are the limitations of the constant growth model?

In: Finance

9.) As mentioned below, you are required to design your own procedure for determining the heat...

9.) As mentioned below, you are required to design your own procedure for determining the heat of dissolution of your chosen salt with a coffee cup calorimeter. Answer the following questions and consider them in designing this procedure:

     a.) When you find your initial temperature Ti, should you take one measurement from the thermometer as soon as you place it in the water in the calorimeter? Why or why not? If not, what should you do instead?

     b.) Do you expect the temperature of the water in the calorimeter to rise, fall, or stay the same after you add your salt? If the temperature will change, will it continue to change indefinitely or not?

     c.) How will you know your dissolved salt solution has reached it's maximum or minimum temperature, i.e. what will you observe in your data to indicate this has happened?

     d.) Should you repeat your experiment? Why or why not? If so, what could you change from trial to trial? Give two possible suggestions, and determine which one you should change (as well as which one you should not!) in any subsequent trials you decide to perform.

*Information previously calculated is below*

1. Calculate the amount of heat (q) produced by the combustion of 4.05 g CH4 (ΔHcomb = -890.4 kJ).

225.38 kj

2. Consider that the 4.05 g methane is burned and all of the heat from this combustion is absorbed by 1.0 kg of 20 °C water (use 4.18 g-1 ºC-1 for the specific heat of the water). What would be the final temperature of the water?

73.8°C

In: Chemistry

three storey structure having a square footprint of 225 m2 is constructed on a clayey deposit....

three storey structure having a square footprint of 225 m2 is constructed on a clayey deposit. The structure is planned to be supported by square isolated footings having a width of 2m and spaced at 5m center to center. typical borehole indicates that the soil consists of 2m fill layer at the top (g=17KN/m3) followed by a very stiff clay layer 2m thick (gsat=18.5KN/m3) underlain by a normally consolidated soft clay layer of 4.5m thickness (gsat=17KN/m3) followed by a rock layer extending down to the bottom of borehole. The foundations are laid on top of the stiff clay layer. Water table is located at the top of the stiff clay layer. Undisturbed samples were taken from the middle of each clay layer and consolidation tests done on undisturbed samples indicated the following:
 Stiff Clay: Cc=0.15; Cs = 0.02; Pc = 120 kPa; e0=0.9

 Soft Normally Consolidated Clay: Cc=0.38; Cs = 0.06; e0=1.0

a) The isolated foundations are subjected to a stress of 140 kPa. Calculate the consolidation settlement. Consider the very stiff clay as one layer and divide soft clay layer into two equal sub-layers. Calculate settlement under one typical foundation.

b) What would be the maximum additional stress applied on a central foundation from two neighboring foundations (situated at the left and right sides of the central foundation). Is it necessary to consider the additional stresses from neighboring foundations in the settlement calculations?

In: Civil Engineering