Author: Hamza Hamid

  • Trees in Computer Science?!?!

    In computer science, there are many ways to organize data to be used effectively. These many ways are called Data Structures. Of the many data structures, there are data structures that are hierarchical in which the data is organized into a tree-like structure. A specific tree data structure that will be taught is a Binary Search Tree.

    In order to learn draw a Binary Search Tree, one must be able to learn the basic things that will help understand.

    A binary search tree is similar to a family tree in a way. Before we begin, lets learn about the different terms that will be useful in understanding.

    Node – a single place where data is.

    Children – the data linked and below another piece of data

    Root – the highest point of data

    Leaf – the data at the ends

    The nodes, root, leaf nodes, and children in a BST

     

    Now that you know the basics, lets learn specific topics that help understand the different forms of a tree.

     

    Full –every node

    other than the leaves has two children

    Complete – every level, except possibly the last, is completely filled, and all nodes are as far left as possible

    Height- the longest path from the root node to a leaf node

    Depth – number of edges from the specific node from the root node

    These are different forms of a tree.
    This shows the height and depth of a tree

     

    A binary search tree is a binary tree in which the nodes have a value that is greater than all values in its left subtree and smaller than all values in its right subtree.

    This is how a BST looks like

     

    In order to insert to a BST, you start from the root of the tree and check if the value is greater than or less than that value and if it is greater than the value, then you go to the right and check again if it is greater than or less than the value and so on and so forth until you get to the end where you add that value to the tree.

    This is how to insert data into a BST

     

    Deleting a node in BST

    When deleting a node within a BST, there are many considerations to check for. The first thing to check is to see if the specific node has any children.

    • If the node has 0 children
      • In this case, you simply delete the node from the BST
    • If the node has 1 child
      • In this case, you replace the node to delete with the child
    • If the node has 2 children
      • In this case, you must replace the node with either the predecessor or successor
        • A predecessor is the maximum value in the node’s left subtree
        • A successor is the minimum value in the node’s right subtree
    Deleting from BST, if the node to delete has 0 children.
    Deleting from BST, if the node to delete has 1 child.
    Deleting from BST, if the node to delete has 2 children.

     

    Good job! You have now mastered one fundamental aspect within Computer Science and are one step closer to being a programming genius!!!

     

    Citations:

    Binary Trees. (2009). Retrieved from https://www.cs.cmu.edu/~adamchik/15-121/lectures/Trees/trees.html

  • Is eating late at night really bad for you?!?!

    Food and Sleep a good combination?

    Imagine this, its been a long day of exams and work and you really want to just hang out with your friends for the night to simply relax. You and your friends are hanging out and time passes fast and next thing you know, it is 2 AM. Out of thin air, one of your friends says “I’m hungry, you guys want to go eat some Waffle House?”. You give in after a few minutes and decide to go get some food. After your Waffle House escapade, you return and are getting tired and go to bed when you enter your apartment door.  After you wake up the next morning, you realize that you shouldn’t have eaten before sleeping and regret your decision. After regretting such decision, you decide to not eat late at night due to the occurrence and instead sleep on an empty stomach. If you have been in a similar situation, it is time to evaluate possible decisions on what to do because certain decisions could lead to potential risks.

    If you decide to sleep on an empty stomach, the decision might not be the best decision to make. Sleeping on empty stomach could lead to certain effects such as weight gain, loss of muscle mass, less energy, changes in mood, low insulin, and lack of sleep (The Sleep Advisor, 2020). However, you probably have been told that eating late at night could lead to weight gains. This idea has been an idea in many peoples’ heads for numerous of times and is a common misconception among many people. This idea of weight gains due to eating at night is based off studies that were conducted on animals rather than humans. This notion is supported by animals, but it doesn’t reflect how humans react to such thing. In fact, in 2016, a study was conducted on children in the UK that checked the association of the time of evening meals as well as the weight status of children. The results of the study indicated that there was no evidence that late eating habits led to excess weight in children (Meixner, 2018). With the study in mind, it is essentially better to watch what you eat before sleeping rather than when you eat. If you decide to eat a huge meal though before sleeping, examine the risks.

    One of the major risks of eating large meals at night is the potential risk of Acid reflux (“This Is what Happens…”, 2018). In general terms, “Acid reflux occurs when contents from your stomach move up into your esophagus” (Healthline Editorial Team & Cruikshank, 2019). Acid reflux can essentially provide discomfort in an individual in their chest area and if commonly occurred, it will lead to other issues. In a study conducted in 2005, different scientists researched the association between gastro-esophageal reflux disease (GERD) and the intervals between bedtime and a huge meal. In this case study, about 147 GERD patients and 294 Non-GERD patients were examined. With different comparisons made, the study concluded that if there is a small-time interval between your last huge meal and bedtime, then there is a significant change you could potentially develop GERD (Fujiwara et al., 2005, p. 2634). This study reflects the idea of eating a huge meal before sleeping. In no way it is saying that you cannot eat at all before sleeping. In fact, eating small healthy snacks before sleeping can be beneficial to one’s sleep as it may help one sleep better, may stabilize blood sugar in the morning, as well as aiding in weight loss (Jones, 2016). Before you sleep, think of the potential things you can do to get a good night’s rest.

    If it is almost bedtime and you are feeling a bit hungry, think about what you can do to make sure you go to bed in a healthy manner. If you are very hungry at night, do not grab your bag of chips and chow down on that, instead eat a healthier snack. If you do not have any healthy snacks, don’t even bother going to your nearest fast food and eating that, instead cook something small and healthy and eat that instead. Again, it isn’t about when you eat, it is about what you eat!

    Citations:

    Fujiwara, Y., Machida, A., Watanabe, Y., Shiba, M., Tominaga, K., Watanabe, T., … Arakawa, T. (2005). Association Between Dinner-to-Bed Time and Gastro-Esophageal Reflux Disease. The American Journal of Gastroenterology, 100(12), 2633–2636. https://doi.org/10.1111/j.1572-0241.2005.00354.x

    Healthline Editorial Team, & Cruikshank, H. (2019, March 22). Everything You Need to Know About Acid Reflux and GERD. Retrieved from https://www.healthline.com/health/gerd

    Jones, R. T. D. (2016, October 28). Is It Bad to Eat Before Bed? Retrieved from https://www.healthline.com/nutrition/eating-before-bed#section4

    Meixner, M. (2018, October 2). Does Eating Late at Night Cause Weight Gain? Retrieved from https://www.healthline.com/nutrition/eating-at-night#circadian-rhythm

    The Sleep Advisor. (2020, January 8). Going To Bed Hungry – Is It A Good Or Bad Thing? | Sleep Advisor. Retrieved from https://www.sleepadvisor.org/going-to-bed-hungry/

    This Is what Happens to Your Body if You Eat Right Before Bed. (2018, December 6). Retrieved from https://www.vice.com/en_us/article/kzvnjz/just-how-bad-is-it-to-eat-before-bed

  • Concussions can affect youth

    From a young age, many children take up sports like football, boxing, and soccer. Playing such sports can potentially have a huge negative effect if a child or teenager experiences a concussion while playing their game. Depending on the person, the damage could have a lasting effect.

    According to the Mayo Clinic, a concussion is a traumatic brain injury that affects your brain with certain effects being headaches, memory problems and balance problems (Mayo Clinic, 2019). A concussion itself could have a lasting impression on many different children and teenagers. Certain effects of a concussion that could be long term are light sensitivity, photophobia, vertigo, depression, and many more symptoms (“Long Term Effects”, 2018). Although these symptoms are pretty short term, you could potentially have long term effects when you are older, but it can have a significant impact when an individual is still young and their brain is still developing. In a study in Sweden between 1973 and 1985 that observed individuals who had head injuries of people under 25. In these studies, the researchers observed that these people were more likely to have mental health care and not able to graduate or attend college than a person who did not have this injury. Not only that, the individual also had a greater chance of dying prematurely (Reynolds, 2016). Therefore, it is important to know the potential risks of allowing ones’ children in playing such sports.

    With the continuous increase of popularity of sports with young children and teenagers, the likelihood of having a concussion has increased. Approximately 1.6 – 3.8 million sports/recreation-related concussions occur each year within the United States (“What is a concussion”, 2019). With the amount of concussions that occur, there are a large number that occur within individuals who are younger than 20. The Blue Cross Blue Shield reported that there was a 71% increase in the number of concussions for individuals under the age of 20 from the years 2010 to 2015 (“The steep rise”). With the practice of such sports, these are slowly leading to concussions. In the United States, the competitive sports with the most reported concussions is football and it accounts for more than 60% of concussions (“What is a concussion”, 2019). Football is one of the major sports that causes the concussion in males as well and it is one of the major sports that causes concussions from 5 – 18 years. Football itself has caused the most concussion in high school sports and the incident rates of having a concussion was .60 per 1000. In female sports, the most amount of concussions occur in soccer (“Which Youth Sports”). With these specific sports causing concussions in the youth, it is our duty to educate and provide safer measures to help younger people to essentially play the sport in safe manner without any injuries or concussions occurring due to lack of precaution.

    In order to prevent concussions, we as a community need to help those younger understand the risks at hand and allow them to understand the problems with doing such. Essentially have protective headgear when playing a sport that may have cause someone to hit their head is a big thing. Specifically, in soccer, it would be a wise thing to do play with a head gear could prevent some injuries according to specific ratings released by the Virginia Tech Helmet Lab (Staff, 2018). Having such protective measures will allow the youth to develop and prevent them from having certain effects as they grow older.

     

     

    Clinic, M. (2019, March 16). Concussion. Retrieved from https://www.mayoclinic.org/diseases-conditions/concussion/symptoms-causes/syc-20355594

    Reynolds, G. (2016, October 5). A Single Concussion May Have Lasting Impact. Retrieved from https://www.nytimes.com/2016/10/05/well/move/a-single-concussion-may-have-lasting-impact.html.

    Long Term Effects of Post Concussion Syndrome. (0AD). Retrieved from https://www.theraspecs.com/blog/long-term-effects-post-concussion-syndrome/

    staff, S. X. (2018, May 2). Could soccer headgear reduce concussion risk? First-ever ratings say yes. Retrieved from https://medicalxpress.com/news/2018-05-soccer-headgear-concussion-first-ever.html.

    The steep rise in concussion diagnoses in the U.S. (0AD). Retrieved from https://www.bcbs.com/the-health-of-america/reports/the-steep-rise-concussion-diagnoses-the-us.

    What is a Concussion? (2019). Retrieved from http://www.protectthebrain.org/Brain-Injury-Research/What-is-a-Concussion-.aspx

    Which Youth Sports Cause the Most Concussions? (n.d.). Retrieved from https://www.medstarsportsmedicine.org/research/which-youth-sports-cause-the-most-concussions/.

  • Atlanta’s growth is Hurting the Environment

    The city of Atlanta is constantly growing. With new apartment complexes, new buildings and more companies coming to the city, the metropolitan of Atlanta is currently the “fourth fastest growing area in the country” (Carnes, 2019). These changes that are occurring within the city are having dramatic changes to the demographics and economy of the city, but these changes are causing detrimental environmental effects as well. 

                 Atlanta has become one of the fastest growing cities in the Southeast of the United States. The demographic of Atlanta has been evolving over this time of constant growth. With the constant growth, the average age of the population of Atlanta has decreased and is lower than the average age of the population of the state of Georgia. In 2019, the median age of Georgia is 36.2, while in Atlanta, the median age is 33.5 (“Atlanta Georgia Population 2019”). The city has a lower median age compared to the entire state due to reasons that younger individuals are moving to the city. According to the NFIB, young people are moving to the city “because of the low cost of living, the growth of the job market, and diversified economy” (“Atlanta is top 20…”). These age differences can have adverse effects on the population that could be good or bad. Within Atlanta, the lower median age can “impact the economy significantly” with negative repercussions.  (Majaski, 2019).

                 The economy of Atlanta is growing as well with the influx of people. The construction industry has a huge influence in the city. In order to accommodate these needs, various construction projects are constantly being started. As of June 2019, the job growth of construction is greater than any other industry in Atlanta (US Dept. of Labor, 2019). These construction projects include housing as well as corporate buildings as well. According to RealPage, the “demand for apartments outstripped new supply in Atlanta by nearly two-to-one with more than 4,200 units being rented while 2,700 new units delivered into the market” (Shchenke, 2019). This signifies that the general young population of Atlanta, constantly needs housing and in order to accommodate this, many constructions occur to provide housing for such. Although there is a huge number of construction projects occurring and benefits the city and people, these construction projects are having negative environmental effects. 

    Despite the construction and growth of the city being a good thing for the city, it can negative effects on the city as well. The city of Atlanta is a major city that is being affected by urban sprawl. According to Britannica, urban sprawl is the “rapid expansion of the geographic extent of cities and towns” (Rafferty, 2019). With this rapid expansion of Atlanta, it is having adverse effects on the environment and has led to drastic deforestation within the city. In order to clear space for new construction, “sprawl-fueled deforestation occurs at the rate of 50 acres per day” (Bullard). This leads to less tree cover for the area which can lead to effects such as more pollution, flooding and soil erosion (“Urban Sprawl”). Along with the effects of general pollution, flooding and soil erosion, a huge impact of urban sprawl within Atlanta is that the overall quality of air in the city will drop. 

                 Air pollution is one of the biggest problems that is caused by urban sprawl. With urban sprawl, many individuals have an “increased dependence on automobiles and other vehicles, and high energy and water use” (“Urban Sprawl: Your Health…”). In this case, the number of cars on the highways or streets essentially increases because people are spread out and do not have sufficient public transport to get to their destination. According to the Atlanta Regional Commision, “Atlantans drive a total of more than 100 million miles per day” (“Facing the facts…”) This means that people spend a long time in their cars due to traffic and general commutes. Along with the general increase in the number of vehicles on the road, the general idea of deforestation caused by urban sprawl would be a huge effect on air pollution. Trees are a huge factor in helping in releasing water vapor and taking in carbon dioxide and other pollutants(“Urban Spawl”). WIth deforestation, there are less factors in helping in decreasing the pollutants and essentially ruin the general air quality. Over the past 15 years, Atlanta has averaged 40 ‘code orange’ days over the past Summers. These ‘code orange’ days can cause specific lung and heart disease and people are advised to stay inside. Along with the ‘code orange’ days, metro Atlanta area fails to meet national health standards for both soot and smog, and likely won’t meet these standards for at least 10 years (“Facing the facts…”). This level of air quality for Atlanta is very bad for the inhabitants and with such expansion, the city of Atlanta needs to look at the effects and find ways to help fix such environmental issues. 

    With the growth of the city, the city of Atlanta needs to implement solutions that allow the city to accommodate the growth, but also be able to solve specific environmental problems. Being able to connect the overall city through different means of transportation, will be a huge factor in helping the air quality of city and prevent further expansion of the city. 

    (2019, August 5). Retrieved from https://www.bls.gov/regions/southeast/news-release/2019/pdf/areaemployment_atlanta_20190805.pdf

    Atlanta, Georgia Population 2019. (n.d.). Retrieved from http://worldpopulationreview.com/us-cities/atlanta-population/.

    Atlanta Is Top 20 City for Young Professionals. (2016, April 20). Retrieved from https://www.nfib.com/content/news/economy/atlanta-is-top-20-city-for-young-professionals-73695/.

    Bullard, R. (n.d.). Atlanta Megasprawl. Retrieved from http://forum.ra.utk.edu/1999fall/atlanta.htm.

    Carnes, J. (2019, April 24). Why is the city of Atlanta’s population growing? Retrieved from https://www.11alive.com/article/news/local/outreach/why-guy/why-is-the-city-of-atlantas-population-growing/85-389f3547-202b-4ad4-a22f-ccfb1e7f1702.

    Facing the Facts about Atlanta’s Air Quality. (n.d.). Retrieved from https://www.southernenvironment.org/cases-and-projects/fact-sheets/facing-the-facts-about-atlantas-air-quality.

    Majaski, C. (2019, October 26). What Is the Working-Age Population? Retrieved from https://www.investopedia.com/terms/w/working-age-population.asp.

    Schenke, J. (2019, July 16). Atlanta’s Apartment Rent Growth Ranks 3rd In The U.S. Retrieved from https://www.bisnow.com/atlanta/news/multifamily/demographic-tailwinds-help-push-atlanta-apartment-rents-up-to-third-strongest-in-nation-99894.

    Rafferty, J. P. (2019, February 7). Urban sprawl. Retrieved from https://www.britannica.com/topic/urban-sprawl.

    Urban Sprawl. (n.d.). Retrieved from https://www.georgiaencyclopedia.org/articles/arts-culture/urban-sprawl.

    Urban Sprawl: Your Environment, Your Health | National Library of Medicine. (n.d.). Retrieved from https://toxtown.nlm.nih.gov/sources-of-exposure/urban-sprawl.

  • Watch what you touch at airports

    The temperature is cold as you wait in the security line at the airport. The line is going slowly and the TSA is constantly notifying the travelers about what to do when it is their turn to put their items in the bin and wait to be checked on. Finally, you get to the bins and grab one and put all items into their respective bins and wait for the agents to command you to walk through the detectors. As soon as you walk in, you go to the bins and grab your items and quickly get to your gate where you get on your plane and sit down and travel to your destination. Throughout this entire experience, you fail to realize how many people are traveling to and from the airport and how many people are touching everything and how many bacteria and viruses are spreading among these travelers.

    Bacteria and viruses can easily spread to one person by different means, such as through the air, contact, exchange of bodily fluids, and improper hygiene (“Fast Facts About How Bacteria Spreads”, 2018). Airborne exchange is through the discharge of microbes by a person who is infected as they cough, sneeze, and laugh (Maine Center for Disease Control & Prevention, 2018).

    In the airport, different things are being handled by numerous individuals constantly. In 2014, a Today correspondent went to an airport and tested different surfaces for bacteria or viruses. In the test, the correspondent had positive results for the security bins to have traces of fecal matter (Rossen & Davis, 2016). The bins tend to be significantly revolting mainly due to the bins being handled constantly by individuals. In order to clean these bins immediately, it would be inefficient and possibly hold up passengers and slow the security clearance process.

    During the travel process, other areas that may contain huge amounts of viruses or bacteria are within the airplane itself. When sitting in an airplane, an individual is accustomed are not only sitting next to many individuals where illnesses could spread easily, but the equipment or seating contains lots of the bacteria or viruses. In a study by TravelMath, there was a test of different places around an airplane and a sample from the tray table had way more bacteria on the table than the flush buttons in the airplane bathrooms (“Airline Hygiene Exposed”, 2015). When also in an airplane, the airport seat pocket is another dirty location for many reasons. On the seat-back pocket MRSA and bacteria E coli was found which lasted for long periods of time (Fottrell, 2018). MRSA is a type of staph bacteria which can cause many skin infections pneumonia or other health issues (“General Info about MRSA”, 2016). These surfaces are constantly being touch by hundreds of people with the bacteria being spread easily, but with certain safe measures, it will be easy to cope and prevent being ill from such. Typically, in airplanes, the seats are immediately cleaned after all passengers have left, but the cleaning completed is not proper. The cleaning is quick in order to seat the next batch of passengers. In the pockets, passengers usually store used napkins, diapers or other trash into these pockets during their flight and cleaning these locations are usually left alone. Based on a study from Auburn university, germs survive up to 7 days on the seat pocket cloth (Clardy, 2014). With these different sites for bacteria, they help the spread of many different diseases.

    Different diseases are spread among different individuals with ease at airports due to the huge influx of people. In the airport, various items are constantly being touched by people, and the different viruses and/or bacteria are spread. In a 2018 study, researchers from Helsinki collected surface and air samples during peak season travel dates from Helsinki Airport and the samples tested positive for respiratory viruses such as Rhinovirus, Adenovirus, Influenza A, and many others (Ikonen ,2018). In airplanes and airports, people are always within close proximity with each other, and these various illnesses are easily spread through a simple cough or sneeze.

    Different measures could be implemented by a traveler to prevent them from getting ill. A possible solution to such is to take disinfectant wipes along with you in a carry on or personal item that allows you to clean the surface of different places you could potentially touch such as the airport tray table or airport seat or whatever. Another solution would be to keep travel sized hand sanitizer to use once you have touched things such as the airport bins or other things. Lastly, try to be cautious on what you touch as it could be the cause of whether or not you could be getting sick.

    References:

    Airline Hygiene Exposed. (2015). Retrieved from https://www.travelmath.com/feature/airline-hygiene-exposed/

    Clardy, M. (2014). Auburn researchers say harmful bacteria can survive for a week inside airliner cabins. Retrieved from http://ocm.auburn.edu/newsroom/featured_story/airliner.html#.XAA1GmhKiUk

    Fast Facts About How Bacteria Spreads | Nova Biologicals. (2018, May 29). Retrieved from https://www.novatx.com/antimicrobial-testing/fast-facts-about-how-bacteria-spreads/

    Fottrell, Q. (2018, April 15). Take this seat on an airplane to reduce your chances of getting sick. Retrieved from https://www.marketwatch.com/story/this-is-how-germs-and-infectious-diseases-spread-on-airplanes-2018-03-20

    Rossen, J., & Davis, J. (2016, October 14). Oh no! Filthy secrets about germ exposure during airline travel. Retrieved from https://www.today.com/news/oh-no-filthy-secrets-about-germ-exposure-during-airline-travel-1D79826980

    Maine Center for Disease Control & Prevention. (2018). Division of Disease Surveillance. Retrieved from https://www.maine.gov/dhhs/mecdc/infectious-disease/epi/airborne/index.shtml

    Niina Ikonen, Carita Savolainen-Kopra, Joanne E. Enstone, Ilpo Kulmala, Pertti Pasanen, Anniina Salmela, . . . Petri Ruutu. (2018, August 29). Deposition of respiratory virus pathogens on frequently touched surfaces at airports. Retrieved from https://bmcinfectdis.biomedcentral.com/articles/10.1186/s12879-018-3150-5

  • Knights and Knaves

    Logic word problems have recently been used to exploit individuals in thinking they help cure certain issues like Dementia, memory loss, and Alzheimer’s disease. This thought of using these logic puzzles as a remedy has been used by developers such as Luminosity. These claims made by Luminosity have proven to be false as “training” your brain to complete certain logic tasks cannot necessarily help an individual cure health problems (Day, 2013). According to George Mason University researchers, many brain puzzle games that essentially help increase an individuals brain power is due to placebo (Vlasits, 2017). Despite this information, this doesn’t change the fact that these logic puzzles cannot benefit an individual in a different aspect. Logic puzzles can be fun, but they can also provide many other benefits that will benefit an individual in many different fields

    Logic puzzles became popularized through the writing of “Alice’s Adventures in Wonderland” by Lewis Carroll (Charles Dodgson). After some time, a Mathematician by the name Raymond Smullyan expanded the realm of logic puzzles and eventually popularized certain puzzles like the “Knights and Knaves” puzzles, where the reader stumbles upon Knights and Knaves and must determine their true identity. Through different problems, many people do not know ways to think of

    One way to solve logic puzzles easily is to think of logic word problems as propositions. Propositions are essentially any statement that can have a true or false value as its output.

    For example:

    Michigan is a country.

    This is a proposition cause it returns a true or false value depending on the situation. In this case, it is false. You can convert these statements to a letter to make problem solving easier, so in the above case, you can use M rather than the entire sentence.

    X + 2 = 4

    This is not a proposition cause it will only return a true or false value based on the value of x which could be anything

    Using said propositions, you have certain symbols that allow an individual to essentially convert the logic to a easier to read statement.

    V = disjunction (or) Example: A V B = A or B

    disjunction is the combination of two statements by “or” which means one must depend on one statement

    ^ = Conjunction (and) Example A ^ B = A and B

    conjunction is the combination of two statements by “and” which means the output must depend on both

    ¬ = Negation (not) Example ¬A = not A

    → = Condition (If Then) Example A→B = if A, then B

    With the symbols used above, one needs to know what the values are when using such. In the tables, T refers to whether the statement is true, and False refers to whether they are false. These are known as truth tables.

    Disjunction

    A B A V B
    T T T                                                (1)
    T F T                                                (2)
     F T T                                                (3)
    F F F                                                (4)

    In order to read this first table, lets think of an example.

    A = Harry is in Arizona

    B = The weather was cold

    In line 1 we see that if A is true and B is true, then A V B must be true because you are seeing if one value is true. In line 4, A V B is false because none of A or B are true.

    Conjunction

    A B A ^ B
    T T T                                                (1)
    T F F                                                (2)
    F T F                                                (3)
    F F F                                                (4)

    For conjunction, we will use the same example as the one provide in disjunction. In line 1, we see that when A is true and B is true then A ^ B is both true. In line 2, we see that when A is true and B is false, then A ^ B is false because only one is true and to fulfill conjunction both have to be the same.

    Negation

    A ¬A
    T F
    F T

    Conditional

    A B A→B
    T T T
    T F F
    F T T
    F F T

    Using the said information, lets walk through an example problem to get a general understanding of what to do.

    EXAMPLE

    As stated previously, Robert Smullyan popularized the puzzle about Knights and Knaves where pretty much you are on an island where you encounter two individuals that are either one is a Knight or a Knave . Knights always tell the truth, whereas a Knave always tells a lie. One of the individuals states that both of them are knights, while the other says that the other is a Knave. It is up to you to solve who the knight and knave is using the information at hand (Smullyan, 2015).

    Step 1: The first step to do is to set a letter or variable to each individual. So the first person is P1 and the second could be P2. It could be anything as long as it sets apart who is who.

    P1 = “Both are Knights”

    P2 = “P1 is a Knave”

    Step 2: Setup the given phrases into a table, where you can assign P1 as Knight or Knave depending on situation and the phrases stated by the individual. Pretty much set up the many possible scenarios. To determine the possible amount of scenarios, you must do 2^(x) where X is the amount of statements , in this case there are only two, where 2 distinguishes the values of True or False.

    P1 P2 Both are Knights P1 is Knave
    Knight Knight
    Knight Knave
    Knave Knight
    Knave Knave

    Step 3: Look at the scenarios, and determine whether the statements said by each individual are true or not and mark them in the truth table

    P1 P2 Both are Knights P1 is Knave
    Knight Knight T F
    Knight Knave F F
    Knave Knight F T
    Knave Knave F F

     

    Step 4: After filling up the truth table, it is now time to analyze to determine who is who. We always look out for truths and in this case only Lines 1 and 3 have truths, but these two lines have a false value as well. We look further at each line to determine this. We look at the first line and see the statements. If P1 says both are knights, then both should be knights, but P2 actually lied saying that P1 is a Knave which leads to this scenario being thrown out. We look at the third line to determine this and find out that the two statements correlate with the phrases stated by the individuals which leads to P1 being the Knave and P2 being the Knight.

     

    This method should work on word puzzles similar to the one done in the example, but if it does not, one can still use certain methods like using propositional statements and determining the validity of said statement within problem.

     

    Now try it yourself.

    Question:

    In a castle far away, we find out the King has been killed by someone and a knight has set out to find the murder of the King. For the investigation, the Knight has interviewed four different witnesses to aid in solving who killed the king. Through such investigating, the Knight has concluded certain things. The Knight has concluded that if the Bishop is telling the truth then the Lord is telling the truth; both the Lord and Prince cannot both be telling the truth; both the Queen and Prince cannot be lying; If the Queen is telling the truth that means the Lord is lying. The Knight must determine who is lying in order to get further in this investigation.

     

    Answer:

     

    Make sure to convert said statements as propositions using the symbols discussed.

    -If the Bishop is telling the truth, then Lord is telling truth = B → L

    -Prince and Lord cannot both be telling truth = ¬ (P ^ L)

    – Prince and Queen cannot both be lying = ¬ (¬P ^ ¬Q)

    – If the Queen is telling the truth, then Lord is lying (Q → ¬L)

    You must also assume everyone is telling the truth in order to catch people in the lies. Using such, we must put in all possible scenarios in a truth table. In such problem, there are 16 possible scenarios because there are four different statements which leads to 2^4.

    B L P Q B → L ¬ (P ^ L) ¬ (¬P ^ ¬Q) (Q → ¬L)
    T T T T T F T F
    T T T F T F T T
    T T F T T T T F
    T T F F T T F T
    T F T T F F T T
    T F T F F F T T
    T F F T F F T T
    T F F F F F F T
    F T T T T F T F
    F T T F T F T T
    F T T F T T T F
    F T F F T T F T
    F F T F T T T T
    F F F T T T T T
    F F F T T T T T
    F F F F T T F T

    Based on the truth table, we realize that there are three possible scenarios that could actually be true.

    The Bishop and Lord are guaranteed to be lying, but either the Queen or Prince could be lying or both could be telling the truth.

     

    Solving problems using logic is applicable to many different situations. It can be used in day to day activities or even specific fields like Computer Science or Mathematics. The problem solving of logic puzzles helps individuals perform tasks by steps and aids in helping an individual make decisions (“Problem Solving and Decision Making”, 2006). In Computer Science, different problems that may use logic include choosing what method to choose or use reasoning on what the said method could be useful for.

    References

    Day, E. (2013, April 20). Online brain-training: Does it really work? Retrieved from https://www.theguardian.com/science/2013/apr/21/brain-training-online-neuroscience-elizabeth-day

    Problem Solving and Decision Making (Solving Problems and Making Decisions). (n.d.). Retrieved from https://managementhelp.org/personalproductivity/problem-solving.htm

    Smullyan, R. M. (2015). What is the name of this book?: The riddle of Dracula and other logical puzzles. Mineola, N.Y: Dover Publications.
     Vlasits, A. (2017, September 14). Could a Videogame Strengthen Your Aging Brain? Retrieved from https://www.wired.com/story/could-a-videogame-strengthen-your-aging-brain/