Register Login
Internet / AI Technology University (ITU/AITU)





|

Top Links: >> 80. Technology >> Internet Technology Summit Program >> 7. Enterprise, Knowledge Architecture, IoT, AI and ML >> 7.1.Critical Thinking - the first step to Knowledge Engineering
Current Topic: 7.1.3. Decision Making Models and Algorithms
You have a privilege to create a quiz (QnA) related to this subject and obtain creativity score...
Decision Making Models and Algorithms

There are several steps in the decision making process. We often skip one or more steps and pay the price later.

CriticalThinkingModel

Framing the problem
To frame the problem means to:
- Identify the problem
o This might require research and brainstorming.
o Do not hesitate asking questions.
o The most successful people are asking a lot of questions and have great listening skills
- Define the criteria, goals and priorities
o Different groups and individuals can see and prioritize differently
- Evaluate effect of the problem
o If the problem does not cause much troubles, maybe it does not make sense to spend time and efforts to overcome the problem

Making a decision
- Find causes of the problem
- Frame alternative decisions
o It is a very important step
o A common mistake is to think of the first decision as the final destination
o Looking for alternatives brings more choices and allows you to select the best option
- Evaluate impact of alternatives and select the optimal based on criteria, goals and priorities

Evaluate the decision
- Measure impacts of the decision
- Plan implementation and implement the decision

Let us apply this section material to programming most common algorithms, like finding maximum and minimum.

Let us frame the problem by providing a sample as a set of numbers:
1,2,3,7,5

Making decision in this case is actually finding an algorithm.
We can see that the MAX number is 7. How did we get to this solution.
Apparently by comparing the numbers.

We start from the first number and think of this number as a potential MAX number.
Then moving to the next number and comparing to that potential MAX number, we change the potential MAX to the bigger number.
Doing the same thing consistently (sounds like a for-loop) we achieve our goal.

The sample below finds maximum number in an array of numbers.

/**
* Find MAX in array
* int[] numbers = {1,2,3,7,5};
* @author Jeff.Zhuk@JavaSchool.com
*
*/
public class FindMaxSample {
public static void main(String[] args) {
// prepare for the loop
int[] numbers = {1,2,3,7,5};
// init the target
int max = numbers[0];
// arrange the loop
for(int i=0; i < numbers.length; i++) {
// work with the next element
if(numbers[i] > max) { // if the next element is more than current maximum
max = numbers[i]; // replace max
}
}
// print the results
System.out.println("MAX="+max);
}
}
Was it clear so far? Highlight the text in question Or


--------------------------------------------------------------------------------
In a similar way the sample below finds minimum number in an array of numbers.


/**
* Find MIN in array
* int[] numbers = {1,2,3,7,5};
* @author Jeff.Zhuk@JavaSchool.com
*
*/
public class FindMinSample {
public static void main(String[] args) {
// prepare for the loop
int[] numbers = {1,2,3,7,5};
// init the target
int min = numbers[0];
// arrange the loop
for(int i=0; i < numbers.length; i++) {
// work with the next element
if(numbers[i] < min) { // if the next element is less than current minimum
min = numbers[i]; // replace max
}
}
// print the results
System.out.println("MIN="+min);
}
}


Assignments:
1. Do a quick research of the subject on the Internet and write a short essay.
2. In Eclipse create a class named ArrayUtility and place two methods there:
public static int getMinimum(int[] arrayOfInts) and
public static int getMaximum(int[] arrayOfInts)
In the main() test these methods:

Declare an array of ints:

int[] arrayOfInts = {3,2,1,5,4};
int min = getMinimum(arrayOfInts);
int max = getMaximum(arrayOfInts);

and display the results

3. Add to this class another method:
public static int getAverage(int[] arrayOfInts)
and add to the main() the line to test the method

int average = getAverage(arrayOfInts);
4. Create two QnA related to a subject and email with the essay and the source of the class ArrayUtility to dean@ituniversity.us


Additional reading:
https://hbr.org/2007/11/a-leaders-framework-for-decision-making


We invite you to create your own questions and answers (QnA) to increase your rank and win the Top Creativity Prize!

| Check Your Progress | Propose QnA | Have a question or comments for open discussion?
<br/>/**
<br/> * Find MAX in array
<br/> * int[] numbers = {1,2,3,7,5};
<br/> * @author Jeff.Zhuk@JavaSchool.com
<br/> *
<br/> */
<br/>public class FindMaxSample {
<br/>	public static void main(String[] args) {
<br/>		// prepare for the loop
<br/>		int[] numbers = {1,2,3,7,5};
<br/>		// init the target
<br/>		int max = numbers[0];
<br/>		// arrange the loop
<br/>		for(int i=0; i < numbers.length; i++) {
<br/>			// work with the next element
<br/>			if(numbers[i] > max) { // if the next element is more than current maximum
<br/>				max = numbers[i]; // replace max
<br/>			}
<br/>		}
<br/>		// print the results
<br/>		System.out.println("MAX="+max);
<br/>	}
<br/>}  
<br/>






Was it clear so far? Highlight the text in question

Or



--------------------------------------------------------------------------------
In a similar way the sample below finds minimum number in an array of numbers.

<br/>/**
<br/> * Find MIN in array
<br/> * int[] numbers = {1,2,3,7,5};
<br/> * @author Jeff.Zhuk@JavaSchool.com
<br/> *
<br/> */
<br/>public class FindMinSample {
<br/>	public static void main(String[] args) {
<br/>		// prepare for the loop
<br/>		int[] numbers = {1,2,3,7,5};
<br/>		// init the target
<br/>		int min = numbers[0];
<br/>		// arrange the loop
<br/>		for(int i=0; i < numbers.length; i++) {
<br/>			// work with the next element
<br/>			if(numbers[i] < min) { // if the next element is less than current minimum
<br/>				min = numbers[i]; // replace max
<br/>			}
<br/>		}
<br/>		// print the results
<br/>		System.out.println("MIN="+min);
<br/>	}
<br/>}  
<br/>


Assignments:
1. Do a quick research of the subject on the Internet and write a short essay.
2. In Eclipse create a class named ArrayUtility and place two methods there:
public static int getMinimum(int[] arrayOfInts) and
public static int getMaximum(int[] arrayOfInts)
In the main() test these methods:

Declare an array of ints:

int[] arrayOfInts = {3,2,1,5,4};
int min = getMinimum(arrayOfInts);
int max = getMaximum(arrayOfInts);

and display the results

3. Add to this class another method:
public static int getAverage(int[] arrayOfInts)
and add to the main() the line to test the method

int average = getAverage(arrayOfInts);
4. Create two QnA related to a subject and email with the essay and the source of the class ArrayUtility to dean@ituniversity.us


Additional reading:
https://hbr.org/2007/11/a-leaders-framework-for-decision-making



We invite you to create your own questions and answers (QnA) to increase your rank and win the Top Creativity Prize!


| Check Your Progress | Propose QnA | Have a question or comments for open discussion?

Have a suggestion? - shoot an email
Looking for something special? - Talk to AI
Read: IT of the future: AI and Semantic Cloud Architecture | Fixing Education
Do you want to move from theory to practice and become a magician? Learn and work with us at Internet Technology University (ITU) - JavaSchool.com.

Technology that we offer and How this works: English | Spanish | Russian | French

Internet Technology University | JavaSchool.com | Copyrights © Since 1997 | All Rights Reserved
Patents: US10956676, US7032006, US7774751, US7966093, US8051026, US8863234
Including conversational semantic decision support systems (CSDS) and bringing us closer to The message from 2040
Privacy Policy