Questions
Recognizing partitions - sets of strings. (b) Let A be the set of words in the...

Recognizing partitions - sets of strings.

(b) Let A be the set of words in the Oxford English Dictionary (OED). For each positive integer j, define Aj to be the set of all words with j letters in the OED. For example, the word "discrete" is an element of A8 because the word "discrete" has 8 letters. The longest word in the OED is "pneumonoultramicroscopicsilicovolcanoconiosis" which has 45 letters. You can assume that for any integer i in the range 1 through 45, there is at least one word in the OED that has i letters. Do the sets A1, …, A45 form a partition of the set of words in the OED?

(don't give explanation with reflexive, symmetric and transitive because we haven't learn it yet)

In: Advanced Math

Grammar Check! "I never said she stole my money." Did you know that this sentence changes...

Grammar Check! "I never said she stole my money." Did you know that this sentence changes its meaning depending on which word you stress? Practice your grammar skills by stressing each word in the sentence; notice how the part of speech stressed affects the meaning of the sentence. Which word did you stress first? What meaning does that sentence have? Which word is the most awkward for you to stress? What meaning does THAT sentence have? For your peer responses this week, comment on at least two of your fellow learner's posts as to how you feel about their interpretation, and whether you feel similarly or differently.

In: Nursing

Write a recursive method that takes a String argument and recursively prints out each word in...

Write a recursive method that takes a String argument and recursively prints out each word in the String on a different line.

Note: You will need to use methods such as indexOf() and substring() within the String class to identify each word and the remaining string.

For example, if the input was ā€œthe cat purredā€, then the method would print the following to the Java console:

the
cat
purred

Challenge Problem

Write a recursive method that takes a string as an input and returns a boolean value that tells you whether the string is a palindrome. A palindrome is a word/sentence that when read backwards is the same as the original word/sentence.

Some example palindromes: ā€œcivicā€, ā€œradarā€, ā€œdeleveledā€, ā€œa man, a plan, a canal: Panamaā€ (ignore the punctuation)

PreviousNext

In: Computer Science

A software company is trying to use Bayes Theorem and other rules of probability to develop...

  1. A software company is trying to use Bayes Theorem and other rules of probability to develop an algorithm that can effectively filter out spam emails. The company’s software developers carefully examined a random sample of 5,000 emails received by its employees and found out that 1200 of the emails were spam. A closer look at the spam emails revealed that 300 of them contained the word ā€˜free’ in the subject line. On the other hand, only 228 of the non-spam emails had the word ā€˜free’ in their subject line. Please answer the following questions based on the given information
  2. What is the probability that a random email will be a spam and will not contain the word ā€˜free’ in its subject line? Please show your work.                           [2 points
  3. If the word ā€˜free’ does not appear in the subject line of an email, what is the probability that the email is not a spam? Please show work.                  [2 points]
  4. What is the probability that a random email will be neither a spam and nor will contain the word ā€˜free’ in its subject line? Please show your work.         [2 points]          
  5. Are an email being a spam and its subject line containing the word ā€˜free’ independent events? Please show how you arrived at your answer.      [1 point]

In: Statistics and Probability

A software company is trying to use Bayes Theorem and other rules of probability to develop...

  1. A software company is trying to use Bayes Theorem and other rules of probability to develop an algorithm that can effectively filter out spam emails. The company’s software developers carefully examined a random sample of 20,000 emails received by its employees and found out that 4,400 of the emails were spam. A closer look at the spam emails revealed that 1,100 of them contained the word ā€˜free’ in the subject line. On the other hand, only 780 of the non-spam emails had the word ā€˜free’ in their subject line. Please answer the following questions based on the given information.

a. What is the probability that a random email will be a spam and will not contain the word ā€˜free’ in its subject line? Please show your work.            

b. If the word ā€˜free’ does not appear in the subject line of an email, what is the probability that the email is not a spam? Please show work.                  [2 points]

  1. c. What is the probability that a random email will be neither a spam and nor will contain the word ā€˜free’ in its subject line? Please show your work.         [2 points]                                
    1. d. Are an email being a spam and its subject line containing the word ā€˜free’ independent events? Please show how you arrived at your answer.      [1 point]

In: Statistics and Probability

Please, write code in c++. Using iostream library. Most modern text editors are able to give...

Please, write code in c++. Using iostream library.

Most modern text editors are able to give some statistics about the text they are editing. One nice statistic is the average word length in the text. A word is a maximal continuous sequence of letters ('a'-'z', 'A'-'Z'). Words can be separated by spaces, digits, and punctuation marks. The average word length is the sum of all the words' lengths divided by the total number of words.

For example, in the text "This is div2 easy problem". There are 5 words: "This"is"div"easy" and "problem". The sum of the word lengths is 4+2+3+4+7 = 20, so the average word length is 20/5 = 4.

Given a text, return the average word length in it. If there are no words in the text, return 0.0.

Input
The first line will contain the text of length between 0 and 50 characters inclusive. Text will contain only letters ('a'-'z', 'A'-'Z'), digits ('0'-'9'), spaces, and the following punctuation marks: ',', '.', '?', '!', '-'. The end of text will be marked with symbol '#' (see examples for clarification).

Output
Output should contain one number - the average length. The returned value must be accurate to within a relative or absolute value of 10-9.

example:

input:

This is div2 easy problem.#

output:

4.0

In: Computer Science

Consider the word 8 letter word PARALLEL (a) how many distinguishable ways can you arrange the...

Consider the word 8 letter word PARALLEL

(a) how many distinguishable ways can you arrange the letters?

(b) In how many distinguishable ways can you arrange the letters so that none of the L's are together?

In: Statistics and Probability

Complete a minimum 700-word product strategy in MicrosoftĀ® Word. Incorporate a product strategy that addresses the...

Complete a minimum 700-word product strategy in MicrosoftĀ® Word. Incorporate a product strategy that addresses the following:

  • Select a product strategy.
  • Address at least three areas of the product lifecycle (NPI, growth, maturity, and decline).
  • Create at least two different types of media methods for the product or service. One method must be print and the other must be non-print, both of which highlight your product or service. In your assignment, include 2-3 sentences about each media method (i.e., one paragraph of what you would do, but not how to do it). For example, (this cannot be used in this assignment), a non-print media method would be a Facebook campaign that provides users with a reward for each review (positive or negative) about the use/appearance/price/etc. of the product or service.
  • Determine how you will measure the marketing activities (i.e., what metrics will be used to determine success or failure).
  • Address three elements of the following Product and Promotion List:
  • Integrated marketing communication
  • Advertising strategy/objectives
  • Push and pull
  • Media strategy
  • Advertising execution                     
  • Direct marketing
  • Public relations/strategies
  • Positioning

In: Economics

public int getIndexOfWord(String[] arr, String word){ // if found, return the index of word, otherwise return...

public int getIndexOfWord(String[] arr, String word){
// if found, return the index of word, otherwise return -1

}

public boolean areArrays(int[] arr1, int[] arr2){
// 1. initial check: both arrays need to have the same length, return false if not the same
// 2. return true if both given arrats are equals(same values in the same indices), false otherwise

}


public boolean areArraysEqual(String[] arr1, String[] arr2){
// 1. initial check: both arrays need to have the same length, return false if not the same
// 2. return true if both given arrays are equals(same values in the same indices), false otherwise

}

In: Computer Science

match word count, include analysis and do not waste word count on extended definitions. question 3...

match word count, include analysis and do not waste word count on extended definitions.

question 3 :Explain what is national culture and its main six dimensions with example for each (650 words)....the six national culture dimension :

•High versus low power distance

•High versus low uncertainty avoidance

•Masculinity versus femininity

•Collectivism versus Individualism

•Long Term versus Short Term Orientation

•Indulgence versus Restraint.

In: Operations Management