a1 - CS2ME3 Assignment 1 due on February 17 Winter 2011 You...

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS2ME3 Assignment 1 due on February 17 Winter 2011 You are encouraged to work in groups of two or three. If you cannot find partners, you can work alone. Please submit one copy of the assignment; if you are working with partners, all names should appear on the assignment. Submit using subversion . Note that you will get a grade of zero if your program does not run. Write a Python program that takes as input the description of a grid, and outputs its minimum cost spanning tree. An n -grid is a graph consisting of n 2 nodes, organized as a square array of n × n points. Every node may be connected to at most the nodes directly above and below (if they exist), and to the two nodes immediately to the left and right (if they exist). An example of a 4-grid is: 4 3 15 1 1 9 1 2 1 23 5 7 6 3 3 4 7 Note that it has 4 2 = 16 nodes, and 17 edges. What is the largest number of edges that an n -grid may have?
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern