Yunqian Cheng
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Discussion for: Joseph Y. Halpern and Yoram Moses, "Knowledge and Common Knowledge in a Distributed Environment" (JACM, 1990) ## Paper overview This paper talks about the relationship of shared knowledge within the context of distributed systems. Having knowledge about the system allows for many useful applications such as coordination within the asynchronous distributed system model. One of the main points they talk about is the hierarchy of knowledge within systems. The hierachy states are as follows. - Distributed Knowledge of fact F - Someone in the group G knows fact F - Everyone in G knows fact F - (Everyone knows that)$^k$ knowledge - Common knowledge Each state on knowledge builds upons the previous and with this we can work up towards a greater state. To illustrate this, the author uses the Muddy Children problem to show the different states of knowledge and how each can be built upon to eventually reach common knowledge. Of the states of knowledge, the most valuable is common knowledge where each member of a system has information of the everything happening in the system as a whole. The author however proves that common knowledge is unattainable for distributed systems because they have the possibility of message failure. They give the Two Generals problems as an example of how coordination is impossible in a system without reliable message delivery. ## Discussion questions ### Q1 In this paper, Halpern and Moses identify several "states of knowledge" of participants in a distributed system, which they put in a hierarchy from weakest to strongest. What are the states of knowledge that the paper discusses? Describe each one informally. What's the difference between "Group G has distributed knowledge of fact F" and "Someone in group G knows fact F"? #### Discussion summary for Q1 Distributed Knowledge of fact F: - The group, as a whole, knows a certain fact F, but no one individually know the fact F. For example: if Alice knows there is a cat in the kitchen, and Bob knows the cat is black, then the group as a whole knows there is a black cat in the kitchen, but none of the members knows this fact individually. - In a sense, it is the idea that the members in a group have a collection of facts that lead to a larger truth, but no one knows the larger truth. Someone in G knows fact F: - There exists at least one person in the group G knows the complete knowledge of fact F. - $\exists$p(p$\in$G $\wedge$ Knows(p, F)) Everyone in G knows fact F: - Everyone in G knows fact F. - $\forall$p(p$\in$G $\wedge$ knows(p, F)) F is the E-k knowledge in G: - If you are to print the logical statement out with code, it would look like this: `print("everyone in G knows that " * k + "F is true")` - For example, when `k=1`, the statement is: `everyone in G knows that F is true` This is the same as "Everyone in G knows fact F" - When `k=2`, the statement is: `everyone in G knows that everyone in G knows that F is true` It's a deeper level of knowledge where not only does everyone know F, but they also know that everyone else knows F. A fun example for this: Suppose you are preparing for an epic heist for Queen Elizabeth's crown jewel, and there is another person - your rival - that is planning the same thing. The key to this heist is knowing the location of the crown jewel. Both you and your rival got to know this location. Naturally, because you are rivals, you and your rival also hacked eachother's computer. Now 1. you know that the rival knows the location, and 2. your rival knows you know the location, but 3. neither of you and your rival know that you have been hacked. This is a E-2 knowledge situation. In the case that you both find out you have been hacked, it would be a E-3 knowledge situation. F is Common Knowledge in G: - F is said to be the common knowledge in a group G if F is the E-k knowlege in G for all `k>=1`. - Common Knowledge is said to be unachievable in a group that relies on messages to exchange information. In the case of the muddy child problem, the fact that at least one child has mud on the forehead becomes a common knowledge as the father announces it. At the moment of the announcement, all the children: 1) know the knowledge, 2) know that this knowledge is broadcasted to everyone, 3) know that everyone has received this knowledge, 4) everyone knows 1~3 ... this could go on forever. - An example for why the common knowledge is impossible in message-based systems is the Two Generals problem. - In this sitation there are two units who are trying to coordinate an attack on one enemy, but they can only communicate through a messenger who travels in between. They can only attack if they are both sure that the other will attack as well. - The first general sends a request to attack to the second general, however the sender is still not sure unless they get an acknowledgement back. They are unsure of this because of the chance the messenger gets lost or caught by the enemy. - If the second general sends the acknowledgement to the first, they become also unsure if their acknowledgement message was sent properly unless they also get an acknowledgement back. - The first general, then would have send an acknowledgement, but then the first becomes unsure and so on. - This leads to a situation where both are constantly waiting for acknowledgement from each other. Due to this, they never are fully sure if they are both going on, so there is no consesus(which is required for common knowledge). ### Q2 Using post-it notes that say "clean" or "muddy", act out the "muddy children" puzzle from section 2 of the paper in your group. Have one group member play the "father" and all other group members be the children who might be clean or muddy. The "father" should put a post-it note on everyone's forehead that says "clean" or "muddy". The "father" in the group gets to decide how many post-it notes say "dirty", but pick an interesting number (i.e., more than 1). Can you follow the reasoning in the paper (with the father repeatedly asking, "Can any of you prove that you are muddy?", and everyone else answering out loud) to get to the point where every muddy person has learned that they are muddy? #### Discussion summary for Q2 In the first round each child thinks the same thing: - If I see no other muddy children, then the muddy child must be me! - If I see one other muddy child, they might be the only muddy child, or I might be muddy as well. Since that child must be thinking what I’m thinking, I know they will leave after the first round of questioning if I am clean. - If not, then I must be muddy too, and I will have to leave after round 2. In the second round: - If I see two other muddy children and I am clean, then by my previous reasoning, they must leave after 2 rounds. - If not, then I must be muddy too, and I will have to leave after round 3. And so on and so forth until k rounds have passed, where k is the number of children that are muddy. ### Q3 Suppose you have a distributed system where process P1 is stuck waiting for a message from process P2, P2 is stuck waiting for a message from process P3, and P3 is stuck waiting for a message from P1. In what sense (from the hierarchy in section 3 of Halpern and Moses' paper) does the group have knowledge of the fact "processes P1, P2, and P3 are deadlocked"? What if you had a deadlock-detection mechanism by which another process in the system P4 learned of the deadlock? What if you had a broadcast mechanism by which P4 could announce the deadlock to P1, P2, and P3? At that point, would "processes P1, P2, and P3 are deadlocked" be common knowledge? #### Discussion summary for Q3 There are three cases we need to consider for broadcast: - All messages are lost -> Then we have distributed knowledge - Some messages are delivered -> Someone in group G knows fact F - All messages are received -> Everyone in the group G knows fact F This problem is similar to the coordinated attack problem. Even if we had a broadcast system available and the deadlocked processes could send and recieve messages, the system would never be able to reach a point of common knowledge. All the processes would know that there is a deadlock, but they would not know whether the other processes are aware of the deadlock unless we assume that the communication channel is reliable and never fail. So, even after a series of infinite acknowledgments, the processes would still be unable to confirm that the other processes have the information that everyone is deadlocked. This is a loop in which gaining a new piece of information creates another loop. ## Errata Typos or other issues found in the paper: [TODO for scribes] ## Other Any interesting points or questions from the group discussion that didn't fit above: [TODO for scribes]

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully