Instantly share code, notes, and snippets.

Robert TalbertRobertTalbert

• Sort options
Created Feb 2, 2017
Solution to MTH 325 Guided Practice 7 review question 2.
View gp7graph.py
 import networkx as nx import matplotlib.pyplot as plt g = nx.Graph( [(0, 3), (1, 2), (1, 4), (2, 3), (3, 4)]) nx.draw(g, with_labels=True, node_color="orange") plt.show()
Created Dec 12, 2016
View FTLC-GrantReport.md

Since taking over the facilitation of the Pew FTLC Grants Program in May 2013, I have made two significant enhancements to the Faculty Conference Travel Grant in consultation with the Pew FTLC faculty/staff, the Pew FTLC Advisory Committee, the Pew FTLC Grants Sub-Committee , and in response to questions/concerns raised by faculty from across the university. Each quarter, the window of time between when the grant system opened and the funding was depleted grew shorter until it became an online race to see which faculty could get into the system first and have access to funds. It was clear that the demand for grant funds was far surpassing the supply and that many of the same faculty were receiving funding year after year. Our first revision to the grant was to implement an every-other-year eligibility so that we could distribute the funds more widely among the faculty. While this temporarily took some pressure off of the online system, our applicant pool continued to grow to the extent that funds were

Last active Dec 20, 2016
View MTH 325 W17 syllabus DRAFT.md

Welcome to MTH 325, Discrete Structures for Computer Science 2. This document contains all the information you need to know about the course. Your job is to read this document carefully in the first week of class and familiarize yourself with how the course works and maintain that familiarity throughout the semester. Almost all questions about the course that you might ask can be answered by referencing the syllabus.

Course catalog description: Properties of relations, equivalence relations, partial orderings, fundamental concepts of graphs, trees, digraphs, networks, and associated algorithms; computer science applications. Offered fall and winter semesters. Prerequisite: MTH 225.

Course information

Created Oct 14, 2016
View gnp_random_weighted_graph.py
 ''' Generates a random weighted graph. n = Number of nodes. p = Probability of two nodes being connected. Must be between 0 and 1. Weights on the edges are randomly generated integers situated between lower_weight and upper_weight. Example: random_weighted_graph(6, 0.25, 10, 20) creates a weighted graph with 6 nodes, a 1/4 probability of two nodes being connected, and weights on the edges randomly selected between 10 and 20. ''' def gnp_random_weighted_graph(n,p,wlow,whigh):
Created Oct 11, 2016
View 325gpdemo.md

MTH 325: Discrete Structures for Computer Science 2

Guided Practice 13: Hamilton Paths

Overview

In the last lesson, we learned about Euler paths, which are paths in a graph that traverse all the edges of a graph exactly once. We can ask a similar question about whether there is a path in a graph that visits each vertex exactly once. That kind of path is called a Hamilton path. This lesson focuses on developing some rules for knowing whether Hamilton paths exist in a graph. This turns out to be a much harder problem than finding Euler paths! So we will be working toward 2-3 theoretical results that give some conditions under which Hamilton paths exist.

Created Oct 10, 2016
View gp_demo.md

Guided Practice for 1.6: The second derivative

Overview

In this section we study the second derivative of a function, which is just the derivative of the first derivative. That is -- "taking a derivative" is something we do to a function, and since the derivative f' is a function, we can take its derivative too. The second derivative is an important ingredient for understanding the subtle behaviors of a function, and in particular the concept of concavity will distinguish between a function that is increasing at an increasing pace and a function that is increasing at a decreasing pace. Our main highlight for this section is to have a clear understanding of the relationships between the sign of f', the sign of f'' (the second derivative), the increasing/decreasing behavior of f, and the concavity of f.

Learning objectives

BASIC learning objectives

Each student will be responsible for learning and demonstrating proficiency in the following objectives PRIOR to the class meeting. **The e

Created Sep 23, 2016
Recursive function for the binomial coefficient
View rec_binom.py
 def rec_binom(n,k): if (k == 0) or (n == k): return 1 else: return binom(n-1, k) + binom(n-1, k-1)
Last active Jun 1, 2016
GHtest.md
View GHtest.md

Testing git

$$\int \frac{1}{1+x^2} , dx = \arctan(x) + C$$

Written with StackEdit.

Created Mar 17, 2016
View Marking Eulerian and Hamiltonian circuits on a graph
 # Eulerian circuits EC = g.eulerian_circuit() g.plot(edge_colors={‘red’:EC}) # Hamiltonian circuits hc = g.hamiltonian_cycle().edges(labels=False) g.show(edge_colors={'red':hc})
Created Feb 19, 2016
SageMath implementation of Warshall's algorithm
View warshall.py
 def warshall(M): n = M.nrows() W = M for k in range(n): for i in range(n): for j in range(n): W[i,j] = W[i,j] or (W[i,k] and W[k,j]) return W
You can’t perform that action at this time.